mw99 / OhhAuth

Pure Swift implementation of the OAuth 1.0 protocol as an easy to use extension for the URLRequest type. (RFC-5849)
Apache License 2.0
36 stars 11 forks source link

Verification of signature fails when converting request tokens to access tokens #3

Closed Ujjwal-N closed 6 years ago

Ujjwal-N commented 6 years ago

Hello, When converting request tokens to access tokens, the api returns the error:

Auth Verification Failed: Verification of signature failed (signature base string was "GET&https%3A%2F%2Fapi.schoology.com%2Fv1%2Foauth%2Frequest_token&oauth_consumer_key%3D7c270332678c7a6b89071cd10710e9a005b90a3e0%26oauth_nonce%3D92ED8369-77FD-4E12-9166-B8B465FC0F5E%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1536906489%26oauth_token%3D98bb7e85be4900e7a0586baf5d68469105b9b54f4%26oauth_verifier%3Duivwguidsvgosdiuvgo%26oauth_version%3D1.0").

Could you look into the signature generating method when there are tokens present? Thanks

mw99 commented 6 years ago

Hi! OAuth is quite complicated protocol and the server side implementations may have small incompatibilities. Without API knowledge and my own access tokens I also can't test anything and also, I don't have the time for that. Sorry.

You already have an applications that successfully converts request tokens to access tokens? Than fire up mitmproxy and compare their SBS (signature base string) with the one generated by OhhAuth.

Also you may not want to post your oauth_consumer_key and other tokens on the internet