0

Hi I am gluing a Django web app together. I need to authenticate my App with an API service that claims to use OAuth2.

From the Providers developer portal I have followed the manual process and sent my https://provider.com/thirdpartylogin?client_id=clientid&redirect_uri=redirect-uri and as advertised I got back the https://your-redirect-url?authCode=temp-auth-code then exchanged the "temp-auth-code" for a real access_token. everything is fine with the manual process

In my web app I am using https://github.com/requests/requests-oauthlib which works great. I cloned this project https://docs.microsoft.com/en-us/graph/tutorials/python and was able to get everything working. I thought it would be simple to swap out the tutorial parameters with my provider URLs and parameters,

I can get so far and in the beginning the URLs look fine, but nothing is working after I am returned to the callback url and I get the error "code_missing". Can it be that my providers URL naming convention is wrong? note the authCode "https://your-redirect-url?authCode=temp-auth-code" I see from OAuth docs "code" is this is the standard naming not authCode. I am new to both Python and Django but if someone can confirm that this is the tripping point I would appreciate it.

0 Answers0