Skip to content

Commit aaac23f

Browse files
authored
refactor(auth): 소셜 로그인 시 다른 계정 선택 가능하도록 개선 (#98)
구글은 prompt=select_account 파라미터 추가, 네이버는 auth_type=reauthenticate 파라미터 추가
1 parent be87dfb commit aaac23f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/main/java/com/devkor/ifive/nadab/domain/auth/infra/oauth/client/GoogleOAuth2Client.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public String buildAuthorizationUrl(String state) {
3434
"&redirect_uri=" + googleProperties.getRedirectUri() +
3535
"&response_type=code" +
3636
"&scope=openid%20email" +
37-
"&state=" + state;
37+
"&state=" + state +
38+
"&prompt=select_account"; // 매번 계정 선택 화면 표시
3839
}
3940

4041
// Access Token 발급

‎src/main/java/com/devkor/ifive/nadab/domain/auth/infra/oauth/client/NaverOAuth2Client.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public String buildAuthorizationUrl(String state) {
3333
"?response_type=code" +
3434
"&client_id=" + naverProperties.getClientId() +
3535
"&redirect_uri=" + naverProperties.getRedirectUri() +
36-
"&state=" + state;
36+
"&state=" + state +
37+
"&auth_type=reauthenticate"; // 매번 로그인 화면 표시 (재인증)
3738
}
3839

3940
// Access Token 발급

0 commit comments

Comments
 (0)