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

Function client_response.was_successful() return False instead of True #7

Closed
mao75 opened this issue Sep 18, 2020 · 3 comments
Closed

Comments

@mao75
Copy link

mao75 commented Sep 18, 2020

Hi.
With this code:
client_response = client.exchange_o_auth_code_for_access_token(authCode,redirectURL,applicationID,clientSecret)
the value of client_response.was_successful() is True with version 1.18.0, but with 1.19.0 the returned value is False.
In the last case the error_response was: <Response [401]>

@mooreds
Copy link
Contributor

mooreds commented Sep 18, 2020

Hiya,

I was able to login, however, the order of the arguments has changed to be more consistent with other libraries.

You can see some discussion about this issue here: https://fusionauth.io/community/forum/topic/311/trouble-getting-the-user-object-post-login/13

In particular, here's the order of parameters for that function:

 resp = client.exchange_o_auth_code_for_access_token(request.args.get("code"), client_id, "http://localhost:5000/oauth-callback", client_secret)

You can see there that the applicationID is before the redirectURL.

Can you please try that and see if it addresses the issue?

@mao75
Copy link
Author

mao75 commented Sep 23, 2020 via email

@mooreds
Copy link
Contributor

mooreds commented Sep 23, 2020

Yes, I agree we need to update the documentation. I have opened a PR for this: FusionAuth/fusionauth-site#214

I'm glad you solved the issue. I'll close this out.

@mooreds mooreds closed this as completed Sep 23, 2020
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