I am trying to create an authentication API for a flutter app that will log users in with a google authentication signup/login form. I followed this tutorial to achieve this.
So far so good, except that the tutorial is based on a GitHub sign in rather than Google. I managed to get it working up till step "connecting" step. I am able to get the code
from the redirect but when I access http://127.0.0.1:8000/auth/google/
I see it's asking for a two fields (access_token
, code
). When I try to just post with the information I do have I get the following error:
"non_field_errors": [
"View is not defined, pass it as a context variable"
]
In many developer websites, we get to see Google social authentication which is very handy. In this article, we will see how to create a Django Google login project. First, go to https://console.cloud.google.com/apis/dashboardand create a project . Go to Oauth consent screen and create a screen and save & continue.
This is a version conflict error with djangorestframework => 3.12 Solution: Downgrade to djangorestframework <= 3.11.0 and everything should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With