Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

django allauth url for google login

I have a sign-in template and I want to add an icon that users can click to go to the google authentication process. I have Django allauth, but how can I get the right url for the google flow?

I tried <a href="{% url 'account_login' %}"> but it sends the user to the login page while I want to send them straight to accounts/google/login/ (ideally generating the url using django and not harcoding it. )

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

try to use this instead :

<a href="{% provider_login_url 'google' %}">Login with Google</a>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading