Skip to content

Commit

Permalink
chore: use local idp on only development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Nov 15, 2023
1 parent a0bde84 commit e436214
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@ import api from '..';
export const getToken = (code: string) =>
api
.get<{ access_token: string }>('/user/login', {
params: { code, type: 'local' },
params: {
code,
...(process.env.NODE_ENV === 'development' && { type: 'local' }),
},
})
.then(({ data, headers }) => {
const refreshToken = headers['set-cookie']

0 comments on commit e436214

Please sign in to comment.