Closed
Description
There have been a few reported issues in Spring Security over the last couple of months related to scope
being configured using space-delimited instead of comma-delimited.
For example, given this configuration:
spring:
security:
oauth2:
client:
registration:
google:
client-id: your-app-client-id
client-secret: your-app-client-secret
scope: openid, profile, email
This would result in ClientRegistration.scopes.size() == 3
.
However, given this configuration:
spring:
security:
oauth2:
client:
registration:
google:
client-id: your-app-client-id
client-secret: your-app-client-secret
scope: openid profile email
This would result in ClientRegistration.scopes.size() == 1
, where ClientRegistration.scopes.contains("openid profile email") == true
.
For this case, oauth2Login()
would not trigger the OpenID Connect flow and instead the standard OAuth 2.0 Authorization Code flow, which is the issue and has been reported as such.
Are we able to enhance the reading/parsing of scope
to support space-delimited as well?