The configuration property security.oauth2.client.registration.*.redirectUriTemplate (YAML-format) does not work for Spring Boot spring-boot-starter-parent 2.2.8.RELEASE. It seems, like it's simply ignored and the default redirect URI is passed, although it's set in the properties.

In version 2.1.8.RELEASE, everything is working fine.

I could not test it with the latest version of Spring Boot, because of other changes.

Comment From: jgrandja

@moritzvieli

Looks like you're missing the spring prefix -> security.oauth2.client.registration.*.redirectUriTemplate

It should be spring.security.oauth2.client.registration.[registration-id].redirectUri

Also, the redirectUriTemplate property was deprecated in favour of redirectUri - I can't recall the Spring Boot version.

Let me know if this helped resolve the issue.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: moritzvieli

@jgrandja Yes, sorry, of course I the spring prefix is there. As mentioned, in 2.1.8.RELEASE it works fine. The template looks like this: "{baseUrl}/oauth2/callback/{registrationId}". Do the placeholders still work with redirectUri instead of redirectUriTemplate? In the docs I can't find anything about the redirectUri: https://docs.spring.io/spring-security/site/docs/current/reference/html5/

Wasn't it the other way round and redirectUri has been deprecated in favour of redirectUriTemplate?

Comment From: jgrandja

@moritzvieli The Spring Boot property registration.[registration-id].redirectUriTemplate was deprecated in 2.1.0.M3 and then it was removed in 2.2.0.M1.

In the docs I can't find anything about the redirectUri

Here is a link to the reference for Spring Boot properties

To resolve your issue, change redirectUriTemplate to redirectUri.

Closing as the proposed changes will solve your issue.

Comment From: moritzvieli

@jgrandja Thanks a lot, this fixed the issue. However, in the reference, redirectUriTemplate is still mentioned instead of redirectUri, unless I've overseen something.

Comment From: jgrandja

@moritzvieli

in the reference, redirectUriTemplate is still mentioned instead of redirectUri

See gh-8906