OAuth 인증 URL에서 response_type을 code로 변경하여 리프레시 토큰 수신 가능하도록 수정

This commit is contained in:
암냥 2025-07-05 13:57:41 +09:00
commit bc796e806d

View file

@ -14,9 +14,8 @@ app.get("/", (req, res) => {
const authUrl = "https://accounts.google.com/o/oauth2/v2/auth?" +
`client_id=${clientId}` +
`&redirect_uri=${redirectUri}` +
`&response_type=token` + // code로 변경하여 리프레시 토큰도 받을 수 있도록
`&scope=email%20profile
`; // 매번 동의 화면을 표시하여 리프레시 토큰 확보
`&response_type=token` +
`&scope=email%20profile`;
res.redirect(authUrl);
});