diff --git a/src/api/auth/auth.ts b/src/api/auth/auth.ts index d2a010f3..cf5cf215 100644 --- a/src/api/auth/auth.ts +++ b/src/api/auth/auth.ts @@ -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']