feat(auth): update redirect URLs for login and logout
Configured default redirection to the homepage upon login and logout actions. This improves user experience by ensuring a consistent landing page post-authentication flow.
This commit is contained in:
parent
6b78601b3c
commit
05a2de7237
2 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,7 @@ urlpatterns = [
|
||||||
SendLoginEmailView.as_view(),
|
SendLoginEmailView.as_view(),
|
||||||
name="login",
|
name="login",
|
||||||
),
|
),
|
||||||
path("logout/", auth_views.LogoutView.as_view(), name="logout"),
|
path("logout/", auth_views.LogoutView.as_view(next_page="/"), name="logout"),
|
||||||
path(
|
path(
|
||||||
"email-sent/",
|
"email-sent/",
|
||||||
TemplateView.as_view(template_name="accounts/email_sent.html"),
|
TemplateView.as_view(template_name="accounts/email_sent.html"),
|
||||||
|
|
|
@ -109,6 +109,8 @@ else:
|
||||||
|
|
||||||
AUTH_USER_MODEL = "accounts.CustomUser"
|
AUTH_USER_MODEL = "accounts.CustomUser"
|
||||||
|
|
||||||
|
LOGIN_REDIRECT_URL = "/"
|
||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
||||||
|
|
Loading…
Reference in a new issue