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

Redirect URI is not encoded #22

Open
tennox opened this issue Jun 14, 2021 · 3 comments
Open

Redirect URI is not encoded #22

tennox opened this issue Jun 14, 2021 · 3 comments

Comments

@tennox
Copy link
Contributor

tennox commented Jun 14, 2021

When passing a redirectUri http://localhost:3000/#/oauth-callback/discord
The pop-up link generated by this lib is:
https://discord.com/oauth2/authorize?client_id=X&redirect_uri=http://localhost:3000/#/oauth-callback/discord&response_type=token

Discord will reject the request with the message: "Invalid redirect URI"

If I manually encode the URI and pass it to the React component, it works fine.

@bhubr
Copy link
Owner

bhubr commented Jun 16, 2021

Thanks for pointing out this issue. I've got a bunch of PRs to look into (including yours!) and I'm adding this to my todo-list.

@bhubr
Copy link
Owner

bhubr commented Jun 18, 2021

@all-contributors please add @tennox for bug

@allcontributors
Copy link
Contributor

@bhubr

I've put up a pull request to add @tennox! 🎉

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