From e43621479b76b9a2a5ae0bfc4eab008f3b173f45 Mon Sep 17 00:00:00 2001 From: 2paperstar Date: Thu, 16 Nov 2023 00:41:49 +0900 Subject: [PATCH] chore: use local idp on only development mode --- src/api/auth/auth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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']