OAuth2AuthorizationCodeGrantWebFilter should not restrict redirect-uri
See original GitHub issueOAuth2AuthorizationCodeGrantWebFilter
currently matches the Authorization Response using the pattern /{action}/oauth2/code/{registrationId}
, which is too restrictive.
We should allow the client to configure the redirect-uri
to be any URI
within the application. The Authorization Response matching should follow the same logic found in OAuth2AuthorizationCodeGrantFilter.shouldProcessAuthorizationResponse()
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Error AADSTS50011 the redirect URI not match the redirect ...
Go to the Authentication blade of your application in the Azure portal. You can open the page directly by inserting your application ID...
Read more >Spring security Oauth2 Redirect URI setting is ignored when ...
It seems your application.properties file is not being picked up. Try setting something simple, like server.port=9000 in the application.
Read more >OAuth 2.0 Security Best Current Practice - IETF
If the user does not see the redirect URI or does not recognize the attack, the code is issued and immediately sent to...
Read more >Prevent Attacks and Redirect Users with OAuth 2.0 State ...
Encode any desired state (like the redirect URL) along with the nonce in a protected message (that will need to be encrypted/signed to...
Read more >What is the limit of redirect_uri(s) in an OIDC app ?
There is a limit of approx 56324 characters for redirect_uri(s) in an OIDC app. The number of redirect_uri(s) can not go beyond this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@clementkng
It’s not necessary to create a new method. Just re-use what’s there like this
Yes, you will need to change
get("/authorize/oauth2/code/registration-id")
toget("/callback")
@clementkng I would recommend reviewing the Authorization Code Grant flow in the spec. The section Authorization Response is implemented by
OAuth2AuthorizationCodeGrantFilter
andOAuth2AuthorizationCodeGrantWebFilter
.After you review the spec and gain a solid understanding of the
authorization_code
grant flow than I believe the code will be more clear.Go through these steps for
oauth2Login()
and you’ll see how to configure theredirect-uri
for the client. The same steps apply foroauth2Client().authorizationGrant()