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

InvalidClientError at /auth/convert-token (invalid_client) <oauthlib.Request SANITIZED> #133

Closed shukhrat121995 closed 2 years ago

shukhrat121995 commented 2 years ago

Describe the bug Retrieved token from Google cannot be converted

To Reproduce Steps to reproduce the behavior:

  1. Go to OAuth 2.0 Playground
  2. Select Google OAuth2 API v2 and authorize https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  3. Exchange Authorization code for tokens and get access token
  4. Use this token in convert-token

Expected behavior /auth/convert-token has to return access token and refresh token

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Django version 4.0.5

shukhrat121995 commented 2 years ago

I got it working. Why you didn't mention setting up the application? It is different from what you mentioned. I found this article https://djangokatya.com/2021/04/09/social-login-for-django-rest-framefork-for-newbies-a-k-a-for-me/ hope it will be useful for others

ebarkhordar commented 2 years ago

I have the same issue and I do not know how I should fix it?