Comments (5)
Yes, this is pretty much what I would do. Just make sure your backup-codes are encrypted in the database
from recovery.
Yes?? how, is it auto accepted by 2fa or I need to create different method to test
from recovery.
2FA does not auto accept backup codes, this is something you have code to help your users restore access to a lost account, if they loose access to the 2FA device (cellphone usually). You don't really have to have backup codes, this is up to you, you could, for example, restore an user's account by sending a new confirmation e-mail, or an SMS, just to be sure it's not someone else trying to steal an account.
2FA (Google2FA) is time based, there are no backup codes to be used with it, which could be stored for later check, it's not how it works.
The YES for your first post was: "Yes, this is how you the process of enabling 2FA for an user should be".
from recovery.
thank for the details I working with laravel and I check the 2fa code I guess the only way is to use the backup code to disable the 2fa as google2fa_secret this is not null the 2fa fired other way to empty @ login and restore @ logout
from recovery.
You would have, probably, to put your "recover via backup code" route out of the "2fa" middleware, if you keep this route in the 2fa middleware, it will, of course, keep asking for it.
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.