Skip to content

Commit 9692abb

Browse files
committed
Use registrationId in redirectURI for default provider
Fixes gh-10505
1 parent 9f4688c commit 9692abb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/CommonOAuth2Provider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public Builder getBuilder(String registrationId) {
9595

9696
};
9797

98-
private static final String DEFAULT_REDIRECT_URL = "{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{clientAlias}";
98+
private static final String DEFAULT_REDIRECT_URL = "{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{registrationId}";
9999

100100
protected final ClientRegistration.Builder getBuilder(String registrationId,
101101
ClientAuthenticationMethod method, String redirectUri) {

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/CommonOAuth2ProviderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class CommonOAuth2ProviderTests {
3535

36-
private static final String DEFAULT_REDIRECT_URL = "{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{clientAlias}";
36+
private static final String DEFAULT_REDIRECT_URL = "{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{registrationId}";
3737

3838
@Test
3939
public void getBuilderWhenGoogleShouldHaveGoogleSettings() throws Exception {

0 commit comments

Comments
 (0)