calebmer / connect

10 stars 2 forks source link

Forgot / Reset password #69

Open brenthaertlein opened 5 years ago

brenthaertlein commented 5 years ago

It would be beneficial for users to be able to reset their passwords via their email, preferably using some secure methodology to allow "unauthenticated" access to modify the value of the user's password.

brenthaertlein commented 5 years ago

Related: #68

brenthaertlein commented 5 years ago

@calebmer I have experience with designing password reset paradigms that "I" consider "secure" (and I've spoken with others in this field and with more experience than I and I've been told my approach is "not incorrect". If you would like to discuss this functionality or what your ideas might be for implementing such functionality, please let me know.

calebmer commented 5 years ago

Would love too. How is it more difficult than sending a “reset password link” to the account’s email with an identity verification with a token that expires in 30 minutes? Are there complexities I’m not seeing?

brenthaertlein commented 5 years ago

That's the simplest implementation that I've chosen in the past. I just try to be very methodical when it comes to anything related to security and Authentication.

I sign a JWT with a nonce stored server side to allow invalidation of tokens, which I think is pretty standard behavior (since JWTs are stateless if you want to invalidate tokens you need to track what was issued). In fact I reset my Ticketmaster password earlier and accidentally clicked it twice and my first token was invalidated by the second one being issued.

I can tell you have a preference for home rolling things which I'm fine with but there are also enterprise grade open source solutions involving Identity & Access Management which sometimes offload these concerns to an existing, established implementation.