Passkeys is a more secure and modern way to authenticate towards a backend. Many current operating systems support it. Passkeys can also be used utilizing a hardware dongle for even more security.
FIDO_SERVER_ID="your.domain.name" # Server rp id for FIDO2, it the full domain of your project
FIDO_SERVER_NAME="EXACT"
import passkeys
KEY_ATTACHMENT = None
After logging in, users can register a key (enrollment) in the user profile:
Step 1: Enter a name for the key
Step 2: Add key with your key provider (here: Mac OS)
Step 3: Hit close, after a page refresh the key should be visible:
Now the user can log in using the passkey by clicking the "Login by passkeys" button: