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

Special characters in redirect url #819

Closed
YannickB opened this issue Apr 6, 2018 · 3 comments
Closed

Special characters in redirect url #819

YannickB opened this issue Apr 6, 2018 · 3 comments

Comments

@YannickB
Copy link

YannickB commented Apr 6, 2018

Hello all,

I have some trouble with whitelisting my url redirect : http://localhost:3000/#/callback. I keep having the error message
debug=invalid_request error=invalid_request hint="Make sure that the various parameters are correct, be aware of case sensitivity and trim your parameters. Make sure that the client you are using has exactly whitelisted the redirect_uri you specified."

Here is the command I use to create client
hydra clients create -n "admin" -c http://localhost:3000/#/callback -g authorization_code,client_credentials -r id_token,code -a core,openid

When I try with the url http://localhost:3000/callback it works fine, so I'm wondering if something is not wrong and if I didn't catch a bug, maybe the # doesn't work with the whitelist. Unfortunately since I redirect to a react app I really need this # in the url, I have no workaround.

What do you think ?

@aeneasr
Copy link
Member

aeneasr commented Apr 7, 2018

Hashbangs/Hashtags are special in OAuth2 as they may only be used with the implicit grant so this works as intended. Note that the implicit grant is discouraged.

@YannickB
Copy link
Author

YannickB commented Apr 7, 2018

Very well, this may cause some incompatibility with some react application I fear, using history/createHashHistory. But if it's part of the standard it can't be help.

Anyway, I ended up finding the difference between history/createHashHistory and history/createBrowserHistory, this solved my use case and hopefully others too. I find we can close.

@YannickB YannickB closed this as completed Apr 7, 2018
@aeneasr
Copy link
Member

aeneasr commented Apr 7, 2018

The reason for this is primarily security concerns. Since all modern browsers allow access to the url bar, hash/hashbang urls are a thing of the past.

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