Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23189

How to redirect django to Google directly with Allauth

$
0
0

I don't have a code problem but a little aesthetic, I'm trying to make a simple login to an app with Django and be able to enter with Google and when I put the label to enter I would like it to direct the user directly to Google as it usually is, but the label sends them to an intermediate Allaut interface and then press another button and go, I would like to skip that interface but I've tried and it always directs me there

Urls of proyect:

from django.contrib import adminfrom django.urls import path, includeurlpatterns = [    path('admin/', admin.site.urls),    path('accounts/', include("allauth.urls")),    path('', include("pagina.urls"))]

Urls of app:

from django.urls import pathfrom . import viewsurlpatterns = [    path("", views.home),    path("logout", views.logout_view)]

And the button's code:

{% load socialaccount %}<h1>Google Login</h1><a href="{% provider_login_url 'google' %}?next=/">Login with Google</a>

Viewing all articles
Browse latest Browse all 23189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>