I try to add a google login button to my website, that runs django as the server. For social authentication I want use dj-rest-auth and tried to go according to it's guides to authenticate with google auth-code flow.
On the client side I use the @react-oauth/google package. The setup on my django server is this:
views.py
class GoogleLogin(SocialLoginView):
adapter_class = GoogleOAuth2Adapter
callback_url = "http://127.0.0.1:8000/accounts/google/login/callback/"
client_class = OAuth2Client
urls.py
path("auth/google/", GoogleLogin.as_view(), name="google_login"),
The google credentials screen settings:
Whenever I try to login with google I get an 400 error from the dj-rest-auth view, and when I debugged the code I looked at the response from google(https://oauth2.googleapis.com/token): I get the following error in the response text(also 400)
{ "error": "redirect_uri_mismatch", "error_description": "Bad Request" }
It looks like my server send the correct redirect uri in the payload

Any help or tips with this issue and social auth in general would be very appreciated, thank you.

