perfood / couch-auth

Powerful authentication for APIs and apps using CouchDB (or Cloudant) with Node >= 14
MIT License
68 stars 19 forks source link

Add 'forgot-username' route and functionality #4

Closed rilrom closed 4 years ago

rilrom commented 4 years ago

The users email address would be sent with the body and if that email address exists it would be sent an email with the username. Currently if the user forgets their username there would be no way for them to ever gain access to their account.

Thanks for this brilliant updated fork of SuperLogin @LyteFM.

fynnlyte commented 4 years ago

Yeah at the moment you can only use the forgot-password route for that purpose. You have the user - context in the Template so you can also send the username in the password reset email. Feel free to submit a PR if you need a separate route for that - it would be the same as in user.forgotPassword but without the token generation. Note that in the new version of Superlogin (under development) usernames are discouraged and E-Mail only is recommended for Registration and Login due to the problem of guessable usernames.

rilrom commented 4 years ago

I'll put together a PR soon to remove the ambiguity for future users that decide to use the current version. Looking forward to testing out the new version.