OpenIdentityPlatform / OpenAM

OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
https://www.openidentityplatform.org/openam
Other
766 stars 149 forks source link

About OAuth2.0 Redirection URIs "?" mark #714

Closed nervermore1 closed 7 months ago

nervermore1 commented 7 months ago

Discussed in https://github.com/OpenIdentityPlatform/OpenAM/discussions/713

Originally posted by **nervermore1** January 23, 2024 My uri format is like this: https://host:port/path?client=test When I use OAuth2 to log in,there is a error 'redirect_uri_mismatch The redirection URI provided does not match a pre-registered value.'
vharseko commented 7 months ago

not issue

nervermore1 commented 7 months ago

Hi, How to fill in the Redirection URIs value?I do not make it work yet. Thank u.

vharseko commented 7 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

nervermore1 commented 7 months ago

Describe the bug Today i use the OpenAM OAuth2.0 service to obtain the access token ,I am encountering this error: "error_description": "The provided access grant is invalid, expired, or revoked.", "error": "invalid_grant"

To Reproduce Steps to reproduce the behavior: 1.Start OAuth2 Provider with default configuration 2.Click /Applications/OAuth2.0 and create a new agent.Redirection URIs is https://192.168.0.1/login 3.The redirection uri in Authorization Request is https://192.168.0.1/login?idp_id=1 4.Client requests an access token with redirection uri https://192.168.0.1/login?idp_id=1 5.OpenAM respones the error invalid_grant

Desktop (please complete the following information): OS: CentOS7 Browser Chrome Version 14.8.2

vharseko commented 7 months ago

https://192.168.0.1/login != https://192.168.0.1/login?idp_id=1

nervermore1 commented 7 months ago

I have tried using Redirection URIs https://192.168.0.1/login?idp_id=1 com.forgerock.openam.oauth2provider.redirectionURIs[0]=https://192.168.0.1/login?idp_id=1 I encountered this error: redirect_uri_mismatch The redirection URI provided does not match a pre-registered value.

vharseko commented 7 months ago

check com.forgerock.openam.oauth2provider.redirectionURIs[0]=https://192.168.0.1/login com.forgerock.openam.oauth2provider.redirectionURIs[1]=https://192.168.0.1/login?idp_id=1

nervermore1 commented 7 months ago
com.forgerock.openam.oauth2provider.redirectionURIs[0]=https://192.168.0.1/login
com.forgerock.openam.oauth2provider.redirectionURIs[1]=https://192.168.0.1/login?idp_id=1

or

com.forgerock.openam.oauth2provider.redirectionURIs[0]=https://192.168.0.1/login?idp_id=1
com.forgerock.openam.oauth2provider.redirectionURIs[1]=https://192.168.0.1/login

Redirect successful,but When Client requests an access token with redirection uri https://192.168.0.1/login?idp_id=1,OpenAM respones the error invalid_grant