wagnerdelima / drf-social-oauth2

drf-social-oauth2 makes it easy to integrate Django social authentication with major OAuth2 providers, i.e., Facebook, Twitter, Google, etc.
https://drf-social-oauth2.readthedocs.io/en/latest/
MIT License
271 stars 34 forks source link

401 Error (Unauthorized) and Uncaught (in promise) Error: Request failed with status code 401 on browser. #141

Closed Madhu25666 closed 1 year ago

Madhu25666 commented 1 year ago

We seem to be getting a 401 error with the new django admin with drf social oauth2. But working fine on Postman We are getting a 401 Error (Unauthorized) when we pass the clientid and client_secret through browser. The same clientID and secret returns the tokens on PostMan.

To Reproduce Steps to reproduce the behavior:

  1. Go to Login page where the signin button is'
  2. Click on 'Signin'
  3. Scroll down to 'Console'
  4. POST http://127.0.0.1:8000/auth/token/ 401 (Unauthorized) and Uncaught (in promise) Error: Request failed with status code 401

Expected behavior An object with access and refresh token

Screenshots error1 error2 error3 error4

Desktop (please complete the following information):

Additional context This was working perfectly before the update to Django administration .

merwan32 commented 1 year ago

hi , I have same probleme do you solved ?? tell me ,

wagnerdelima commented 1 year ago

If it's working fine on Postman, you have an issue with your front-end application. One question, @Madhu25666 why are you authenticating with /token and not /convert-token?