Social auth login using JWT in Django - This authorization code has expired

957 Views Asked by At

I am a Python newbie and I want to integrate the functionality for social login in my Django project, using JWT authentication. I used this package, but the documentation of this project is not good. It shows that I need to send an object { 'provider' : '', 'code' : '' } to the endpoint to get a JWT token. But I am not able to understand how I will get this code for Facebook, Twitter, Google etc.

I got a code as response from Facebook by hitting the Facebook oauth url but when I used it in object for endpoint it always show this error:

Authentication process canceled

{
  'error': {
    'message': 'This authorization code has expired.', 
    'type': 'OAuthException', 
    'code': 100, 
    'fbtrace_id': 'A7njJL6BTqXbji1TC5Xl1Us'
  }
}

Bad Request: /api/login/social/jwt/

Any help or suggestion would be greatly appreciated. Thanks in advance.

0

There are 0 best solutions below