Coder Social home page Coder Social logo

How to Test one 2FA backup-code about recovery HOT 5 CLOSED

diadal avatar diadal commented on May 27, 2024
How to Test one 2FA backup-code

from recovery.

Comments (5)

antonioribeiro avatar antonioribeiro commented on May 27, 2024

Yes, this is pretty much what I would do. Just make sure your backup-codes are encrypted in the database

from recovery.

diadal avatar diadal commented on May 27, 2024

Yes?? how, is it auto accepted by 2fa or I need to create different method to test

from recovery.

antonioribeiro avatar antonioribeiro commented on May 27, 2024

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.

diadal avatar diadal commented on May 27, 2024

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.

antonioribeiro avatar antonioribeiro commented on May 27, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.