Skip to content

Commit

Permalink
Use shorter user ID's for now
Browse files Browse the repository at this point in the history
Can undo this when MasterKale/SimpleWebAuthn#530 is fixed
  • Loading branch information
MasterKale committed Mar 28, 2024
1 parent 13120a2 commit 4706d25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _app/homepage/services/registration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Union, List, Optional
import secrets

from django.conf import settings
from webauthn import (
Expand Down Expand Up @@ -110,6 +111,8 @@ def generate_registration_options(
rp_id=settings.RP_ID,
rp_name=settings.RP_NAME,
user_name=username,
# TODO: Remove when https://github.com/MasterKale/SimpleWebAuthn/issues/530 gets fixed
user_id=secrets.token_bytes(32),
attestation=_attestation,
authenticator_selection=authenticator_selection,
supported_pub_key_algs=supported_pub_key_algs,
Expand Down

0 comments on commit 4706d25

Please sign in to comment.