diff --git a/backend/typescript/rest/authRoutes.ts b/backend/typescript/rest/authRoutes.ts index ea4784aa..67ab3976 100644 --- a/backend/typescript/rest/authRoutes.ts +++ b/backend/typescript/rest/authRoutes.ts @@ -25,6 +25,11 @@ const cookieOptions: CookieOptions = { secure: process.env.NODE_ENV === "production", }; +authRouter.use((req, res, next) => { + res.setHeader('Access-Control-Allow-Origin', '*'); + next(); +}); + /* Returns access token and user info in response body and sets refreshToken as an httpOnly cookie */ authRouter.post("/login", loginRequestValidator, async (req, res) => { try { diff --git a/frontend/src/components/auth/Login.tsx b/frontend/src/components/auth/Login.tsx index 2458b120..9d0d04ca 100644 --- a/frontend/src/components/auth/Login.tsx +++ b/frontend/src/components/auth/Login.tsx @@ -43,7 +43,7 @@ const Login = (): React.ReactElement => { const res: AuthenticatedUser | string = await authAPIClient.loginWithGoogle( tokenId, ); - + console.log(res); if (isAuthenticatedUserType(res)) { setLoginStatus("success"); setAuthenticatedUser(res);