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

callback url does not work proberly #3

Closed
plaftmp opened this issue Aug 9, 2016 · 4 comments · Fixed by #5
Closed

callback url does not work proberly #3

plaftmp opened this issue Aug 9, 2016 · 4 comments · Fixed by #5

Comments

@plaftmp
Copy link

plaftmp commented Aug 9, 2016

Hi.

When i use this strategy, i get the following error after i login.

invalid_redirect_uri: redirect_uri for token request does not match redirect_uri for code request {"error":"invalid_redirect_uri","error_description":"redirect_uri for token request does not match redirect_uri for code request"}

Happen when it tries to get a token.

When i check what redirect uri i sent i get: http://seetest.dev:3006/auth/createsend/callback?code=a_code&state=a_state

If i set manualy the redirect uri in gems/oauth2-1.2.0/lib/oauth2/client.rb to : http://seetest.dev:3006/auth/createsend/callback the flow to get the token will work

Is that a problem with this strategy or with the api wich doesn't allow redirect url with params?

Thanks in advance

@stoge
Copy link

stoge commented Nov 25, 2016

It would be nice to have a fix for this issue :D (please)

@pjg
Copy link
Contributor

pjg commented Jun 21, 2017

Took me a while to figure this out and reach this page.

This is an incompatibility with the latest omniauth-oauth2 gem. Downgrading omniauth-oauth2 to 1.3.0 fixes this issue. The issue is discussed here: omniauth/omniauth-oauth2@2615267 and mentions possible workarounds.

l1h3r pushed a commit to l1h3r/omniauth-infusionsoft that referenced this issue Mar 16, 2018
* Fix compatibility with omniauth-oauth 1.4+

References:
* omniauth/omniauth-oauth2#70
* omniauth/omniauth-oauth2@2615267
* omniauth/omniauth-oauth2#82
* jdennes/omniauth-createsend#3
* WebTheoryLLC/omniauth-twitch#4
* jdennes/omniauth-createsend#5
* DripEmail/omniauth-drip#6

* Don't force https if it's localhost

* Allow 127.0.0.1 and localhost to be on http

* Lookup IP for the given host and force ssl

Avoid to force ssl for local IPs (127/8 network)

* Improve resolving

* Improve even more

* Fix regexp

* Allow fe80::* entirely
@ManuelFrigerio
Copy link

Hi, was this ever fixed? I'm still getting the same problem.

@espen
Copy link

espen commented Apr 22, 2020

@ManuelFrigerio yes it is fixed but not merged here: #5

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

Successfully merging a pull request may close this issue.

5 participants