Gokul595 / api_guard

JWT authentication solution for Rails APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to not only change password but also to reset forgotten password

luca-bruegger opened this issue · comments

Is your feature request related to a problem? Please describe.
As far as I understand the current features of this api_guard gem, there is no real functionality to reset a user password if it was forgotten. I would like to have such a feature, in my opinion its close to a must-have-feature.

Describe the solution you'd like
A tip on how to implement a password forgotten feature with the api_guard gem and devise.

Describe alternatives you've considered
Currently I am implementing a password reset feature, but I don't know if it is going to work.

Additional context
The change password feature is nice. But I would like to have the ability for users to reset their passwords before they are logged in. E.g. the user want's to login with his already created account. But before he does, he notices, that he has forgotten his password. After that, he clicks on the (self made) password forgotten Link and get's to a new View where he can enter his email. Then the user clicks submit. He receives an Email with a link + token to reset the password. Then a request with a body containing the users email and passwords gets sent and after that, the password has been resetted and all Tokens refreshed.