Skip to content
Snippets Groups Projects
Commit f32460b6 authored by Julian's avatar Julian
Browse files

a bit of documentation on the recovery code model

parent 95209e6f
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,8 @@ class RecoveryCodeMethod(MFAMethod):
def __init__(self, user):
super().__init__(user, None)
# The code attribute is only available in newly created objects as only
# it's hash is stored in the database
self.code = secrets.token_hex(8).replace(' ', '').lower()
self.code_hash = crypt.crypt(self.code)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment