Skip to content

Commit

Permalink
implement validate code to support 5mins
Browse files Browse the repository at this point in the history
  • Loading branch information
gagantrivedi committed May 21, 2024
1 parent ef7a3d6 commit 123345f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/custom_auth/mfa/backends/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ def dispatch_message(self):
"secret": self._mfa_method.secret,
}
return Response(data)

def validate_code(self, code: str) -> bool:
return self._get_otp().verify(otp=code, valid_window=20)

0 comments on commit 123345f

Please sign in to comment.