-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update call to
generate_registration_options
This implements Option 2 of the webauthn migration notes (https://github.com/duo-labs/py_webauthn/releases/tag/v2.0.0) by adding a new field `webauthn_id` to the user model that is automatically generated using a helper method by webauthn.
- Loading branch information
1 parent
b99a51b
commit b952142
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.10 on 2024-03-28 18:24 | ||
|
||
from django.db import migrations, models | ||
from webauthn.helpers import generate_user_handle | ||
|
||
|
||
class Migration(migrations.Migration): | ||
""" | ||
Add a webauthn id bytes field to the user model | ||
""" | ||
|
||
dependencies = [ | ||
("cms", "0087_language_social_media_webapp_description_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="user", | ||
name="webauthn_id", | ||
field=models.BinaryField( | ||
default=generate_user_handle, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters