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

OAuth (GitHub) redirects to callback url twice #749

Closed
neroniaky opened this issue Oct 14, 2016 · 2 comments
Closed

OAuth (GitHub) redirects to callback url twice #749

neroniaky opened this issue Oct 14, 2016 · 2 comments

Comments

@neroniaky
Copy link
Contributor

neroniaky commented Oct 14, 2016

Hey,

I'm currently trying to the OAuth to work with Angular2-Token. You can give the OAuth a try here: Heroku Demo. (Angular2 + Devise Token Auth + Rails 5.0 API).

It works as expected until the last redirect:

  1. Open second GitHub OAuth window for login ✅

https://github.com/login/oauth/authorize?client_id=5db8f6c05510a8f5ab5f&redirect_uri=https%3A%2F%2Fangular2-token.herokuapp.com%2Fomniauth%2Fgithub%2Fcallback%3Fresource_class%3DUser&response_type=code&scope=email%2Cprofile&state=51f51db231dfea77419cb0772a97cd3d2f6d0fa9302af969

  1. After successful sign in Github redirects to /oauth/github/callback

https://angular2-token.herokuapp.com/omniauth/github/callback?code=b51d004c4a84daf0684c&resource_class=User&state=51f51db231dfea77419cb0772a97cd3d2f6d0fa9302af969

  1. Then redirect to //oauth/github/callback (notice the double slash) which does not exist. ❌

Any suggestions how to solve this? Thanks a lot!

@roterski
Copy link
Contributor

roterski commented Nov 8, 2016

Hey @neroniaky,
I have run into the same issue when I was trying to integrate this gem with Angular2-Token too. Here I've submitted a fix for that double slash issue #765 . Although it might not fix your problem entirely, it unblocks this one step. :)
Looking forward to hearing your feedback!

@neroniaky
Copy link
Contributor Author

Fixed with PR #765

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