-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Inconsistent encoding when comparing oauth1_config::m_token in oauth1_config::token_from_redirected_uri() #5
Labels
Comments
This seems like the right fix. Thanks for the detailed debugging here. |
This was referenced Dec 27, 2019
GerHobbelt
pushed a commit
to GerHobbelt/cpprestsdk
that referenced
this issue
Mar 20, 2024
Invoking the callback could result in _CancellationTokenState being destroyed. Accessing data members on the destroyed object could cause a crash.
GerHobbelt
pushed a commit
to GerHobbelt/cpprestsdk
that referenced
this issue
Jun 21, 2024
…microsoft#5) Co-authored-by: rmyers808 <Richard.Myers@spirentcom.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am getting an exception at final stage of authentication process - "redirected URI parameter 'oauth_token'='...' does not match temporary token='...'.".
Probably I found why it fails.
When temporary token is received it is stored to oauth1_config::m_token as URI DECODED. See https://github.com/Microsoft/cpprestsdk/blob/master/Release/src/http/oauth/oauth1.cpp:319
After redirection, we get access token by calling oauth1_config::token_from_redirected_uri(uri). Which throws an exception, because it tries to compare token stored at step 1) and URI ENCODED token from redirected uri.
The possible workflow: decode redirected uri manually for oauth1_config::token_from_redirected_uri. Is that correct solution?
Regards,
Vladimir.
The text was updated successfully, but these errors were encountered: