Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nervermore1 opened this issue Jan 23, 2024 Discussed in #713 · 8 comments
Closed

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

nervermore1 opened this issue Jan 23, 2024 Discussed in #713 · 8 comments

Comments

@nervermore1
Copy link

Discussed in #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
Copy link
Member

not issue

@nervermore1
Copy link
Author

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

@vharseko
Copy link
Member

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):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@nervermore1
Copy link
Author

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
Copy link
Member

@nervermore1
Copy link
Author

nervermore1 commented Jan 24, 2024

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
Copy link
Member

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

vharseko added a commit to vharseko/OpenAM that referenced this issue Jan 25, 2024
@nervermore1
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants