OAuth 인증 URL에서 response_type을 code로 변경하여 리프레시 토큰 수신 가능하도록 수정
This commit is contained in:
parent
5dbc8345ba
commit
bc796e806d
1 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue