Comments (6)
I store them in the database, encrypted, in the users table, using a json column (backup_codes). Storing 8 codes would take around 200 chars, I don't thing this is too big.
There's this issue which goes a little in the workflow: antonioribeiro/google2fa#85 (comment)
I think it's pretty straightforward:
Register or Logged in
User asks to enable 2FA
Show 2FA qr-code
Show 2FA backup codes
Test the 2FA qr-code
Test one 2FA backup-code
System enables 2FA
Login
Ask for login/password
Ask for 2FA
User cannot give a right code?
Ask for a backup code.
from recovery.
Yeah, same request here aswell, what is the best workflow/example in an application for this?
from recovery.
Thank you!, I understand the workflow now! 👍
from recovery.
how can I test this Test one 2FA backup-code is it auto accepted by 2fa or I need to create different method to test
from recovery.
I store them in the database, encrypted, in the users table, using a json column (backup_codes)
@antonioribeiro could you expand (code wise) on how you store them encrypted? I'm currently troubleshooting storing the generated codes encrypted in a PostgreSQL json column myself (Laravel 5.6).
from recovery.
Hi,
I know this is an old thread but I have a question.
If a user uses one of the backup codes, is it best practice to delete that code from the list of backup codes and add another unique one? Or if a backup code is used it should be marked as invalid from then on.
from recovery.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recovery.