Coder Social home page Coder Social logo

Comments (10)

andersr avatar andersr commented on May 22, 2024 1

@dev-xo I think a 2-step route auth path would be preferable, as I think having separate routes would provide more flexibility.

Re. submitting a new login email, I think the the most recently submitted email should just overwrite what's currently in the session.

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024 1

Yeah, already working on a fix for it.

This will be integrated directly into the Strategy, while keeping the client implementation unchanged.
If the provided form email is not the one that's already stored in session, the authentication flow should reset.

Will probably be ready today.
Thank you for the feedback @andersr!

from remix-auth-totp.

andersr avatar andersr commented on May 22, 2024 1

Excellent , thanks!

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024 1

v1.0.4 has been published @andersr.

Feel free to have a look, test it and tell me if everything works as expected.
In my dev environment it does.

Will require to add proper tests to it.

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024

Hello @andersr! Good question actually.

I usually tend up to remove the cookie from the browser, but I think users should not do that, instead we should provide an easy way for them to enter another email, or simply reset the authentication flow.

Gonna look into it, and I will come up with an example for you.
Thanks for noticing @andersr!

P.S: Also, an advanced-usage.md file will be created inside the /docs folder. I have some advanced cases that could fit there.

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024

Check the new Starter Example @andersr. It uses a 2-Step route verification.

If you go back to /login after inputed the first email, you could enter a different email or simlpy fix the typo from the first one.

On submit, database will invalidate previous OTP.

Screen Shot 2023-10-02 at 07 14 48

Notice me if this is what you was looking for @andersr.
Some new changes and advanced usages will be added soon.

P.S: Just added 3 new examples in case you wanna check them.

from remix-auth-totp.

andersr avatar andersr commented on May 22, 2024

@dev-xo thanks for all the great insights and for updating the example to include a separate verify page. I tried running it and found that if I go back to the login page and submit a new email address, it does send another email, but to the original email rather than the new one.

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024

Yeah, good point @andersr.

Noticed the OTP was correctly invalidated but didn't went deeper.
It has a lot of sense actually. We are probably re-sending the email that's already stored in session.

Ideally, I would want a client-side fix to avoid updating the Strategy.
Otherwise I should come up with a handler that could invalidate the Session on call.

Thanks for noticing! Will looking into it.


P.S: Also question for you @andersr.

  • Do you prefer the 2-step route authentication path? (/login & /verify)
  • Or for simplicity you would stick with a single one?

from remix-auth-totp.

andersr avatar andersr commented on May 22, 2024

@dev-xo pulled the new version and tested it. Everything works as expected (email address updates on 2nd submit)

from remix-auth-totp.

dev-xo avatar dev-xo commented on May 22, 2024

Happy to hear that @andersr. Thank you for the feedback!
Feel free to come up with more ideas / fixes. Them will be welcomed.

from remix-auth-totp.

Related Issues (18)

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.