class allauth.mfa.adapter.DefaultMFAAdapter

The adapter class allows you to override various functionality of the allauth.mfa app. To do so, point settings.MFA_ADAPTER to your own class that derives from DefaultMFAAdapter and override the behavior by altering the implementation of the methods according to your own need.

decrypt(encrypted_text: str) str

Counter part of encrypt().

encrypt(text: str) str

Secrets such as the TOTP key are stored in the database. This hook can be used to encrypt those so that they are not stored in the clear in the database.


The error messages that can occur as part of MFA form handling.

get_totp_issuer() str

Returns the TOTP issuer name that will be contained in the TOTP QR code.

get_totp_label(user) str

Returns the label used for representing the given user in a TOTP QR code.