Skip to content

Commit

Permalink
Update redirect to cognito to a relative url
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Jul 10, 2024
1 parent 85d3b8a commit 215ad92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/civil_society_vote/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import include, path
from django.urls import include, path, reverse
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import RedirectView

Expand Down Expand Up @@ -77,9 +77,11 @@
)

urlpatterns_simple = [
# Skip the login provider selector page and redirect to Cognito
path(
"allauth/login/", RedirectView.as_view(url="/allauth/amazon-cognito/login/", permanent=True)
), # Skip the provider selector page and redirect to Cognito
"allauth/login/",
RedirectView.as_view(url=reverse("amazon_cognito_login", urlconf="allauth.urls"), permanent=True),
),
path("allauth/", include("allauth.urls")),
]

Expand Down

0 comments on commit 215ad92

Please sign in to comment.