Skip to content

Commit 4543d04

Browse files
authored
fix: update approval_prompt=force to prompt=consent (#1752)
* fix: update approval_prompt=force to prompt=consent * chore: Update test to check to prompt query
1 parent c5648a5 commit 4543d04

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

oauth2_http/java/com/google/auth/oauth2/UserAuthorizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public URL getAuthorizationUrl(
206206
url.put("state", state);
207207
}
208208
url.put("access_type", "offline");
209-
url.put("approval_prompt", "force");
209+
url.put("prompt", "consent");
210210
if (userId != null) {
211211
url.put("login_hint", userId);
212212
}

oauth2_http/javatests/com/google/auth/oauth2/UserAuthorizerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public void getAuthorizationUrl() throws IOException {
207207
assertEquals("code", parameters.get("response_type"));
208208
assertEquals(pkce.getCodeChallenge(), parameters.get("code_challenge"));
209209
assertEquals(pkce.getCodeChallengeMethod(), parameters.get("code_challenge_method"));
210+
assertEquals("consent", parameters.get("prompt"));
210211
}
211212

212213
@Test

0 commit comments

Comments
 (0)