google-auth-library-java
google-auth-library-java copied to clipboard
UserAuthorizer adds `approval_prompt=force` and conflicts with `prompt=consent`
Environment details
- OS type and version: Any
- Java version: 21/any
- version(s): 1.23 (but code exists in the newest as well)
Steps to reproduce
- Using Google Ads library (v.31.0.0)
- Create Authorization request by URL
- It contains
approval_prompt=forceby default
Code example
UserAuthorizer userAuthorizer = UserAuthorizer.newBuilder()
.setClientId(ClientId.of("123", null))
.setScopes(Arrays.asList(googleProperties.ads().scopes().split(" ")))
.setCallbackUri("/customer/google)
.build();
return userAuthorizer
.getAuthorizationUrl(
userId,
state,
URI.create(serverHost),
Map.of("prompt", "consent"));
External references such as API reference guides
https://developers.google.com/identity/openid-connect/openid-connect#prompt
The approval_prompt is not even mentioned in the documentation
Any additional information below
After using it like this we get an error Conflict params: approval_prompt and prompt
but there is no way to remove approval_prompt parameter, except manual operation after URL is created.