stages/authenticator_validate: fix prompt not triggering when using in non-authentication context

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-22 18:03:02 +01:00
parent e72f0ab160
commit 2e48e0cc2f
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ class AuthenticatorValidateStageView(ChallengeStageView):
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
"""Check if a user is set, and check if the user has any devices
if not, we can skip this entire stage"""
user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)
user = self.get_pending_user()
stage: AuthenticatorValidateStage = self.executor.current_stage
if user:
challenges = self.get_device_challenges()