stages/user_login: only show successful login message at login stage
This commit is contained in:
parent
395ef43eae
commit
e2ca72adf0
|
@ -1,7 +1,6 @@
|
|||
"""passbook password stage"""
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth import _clean_credentials
|
||||
from django.contrib.auth.backends import BaseBackend
|
||||
from django.contrib.auth.signals import user_login_failed
|
||||
|
@ -122,5 +121,4 @@ class PasswordStageView(FormView, StageView):
|
|||
self.executor.plan.context[
|
||||
PLAN_CONTEXT_AUTHENTICATION_BACKEND
|
||||
] = user.backend
|
||||
messages.success(self.request, _("Successfully logged in!"))
|
||||
return self.executor.stage_ok()
|
||||
|
|
|
@ -39,4 +39,5 @@ class UserLoginStageView(StageView):
|
|||
flow_slug=self.executor.flow.slug,
|
||||
session_duration=self.executor.current_stage.session_duration,
|
||||
)
|
||||
messages.success(self.request, _("Successfully logged in!"))
|
||||
return self.executor.stage_ok()
|
||||
|
|
Reference in New Issue