scheb / 2fa

Two-factor authentication for Symfony applications 🔐
MIT License
505 stars 75 forks source link

Different Twig-Site for Backup-Codes #173

Closed luggesexe closed 1 year ago

luggesexe commented 1 year ago

Hello Scheb, before starting, a thank you for this great library!

I implemented the authentication successfully and I could already implement a custom Twig-Site under TOTP/Template. We are using an input field, that only allows numbers and single fields. This works all great and has no issue.

As starting out with the Backup-Code-Package, I could see, that it uses the same form input as for the TOTP-Token. Is there any way to set up a different template to input the Backup-Code.

Such as under Backup-Codes/Template the same way it is used on TOTP? That way on the TOTP-Page a link could be referenced with "Use Backup-Codes instead" linking to a form with a text input needed for the BC.

Maybe I did oversee something. I am glad on any information.

scheb commented 1 year ago

There is no extra form for the backup code. You enter the backup code instead of an actual authentication code into the same field.

If you want different UI for entering backup codes, I'd either recommend

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.