Giter Site home page Giter Site logo

Add password reset through email about hexpm HOT 7 CLOSED

hexpm avatar hexpm commented on May 9, 2024
Add password reset through email

from hexpm.

Comments (7)

jcspencer avatar jcspencer commented on May 9, 2024

Like in #21, we can simply generate a string reset_token and a date reset_last_requested. When it comes to the email itself, we can simply send a link to, for example, /reset/:token that will only work for, say, 30 minutes after reset_last_requested.

It would also be required that all current sessions are invalidated and that the user must log in with the new password after the reset, for security purposes.

from hexpm.

josevalim avatar josevalim commented on May 9, 2024

It would also be required that all current sessions are invalidated and that the user must log in with the new password after the reset, for security purposes.

Very good point. A common practice is to store the password salt in the session and compare it with the one in the database on every fetch. If the salt in the session differs from the DB, the session is invalid.

from hexpm.

jcspencer avatar jcspencer commented on May 9, 2024

@josevalim 👍 This sounds like it would work nicely!

from hexpm.

ericmj avatar ericmj commented on May 9, 2024

We don't have sessions today so that won't be an issue.

I would also like to add the option to invalidate all the users API keys after the password has been reset.

from hexpm.

jcspencer avatar jcspencer commented on May 9, 2024

Would this delete the key entirely, or set a flag on the key row?

from hexpm.

ericmj avatar ericmj commented on May 9, 2024

Just delete it.

from hexpm.

jcspencer avatar jcspencer commented on May 9, 2024

Assigning myself to this one, working on it this weekend.

from hexpm.

Related Issues (20)

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.