Email Auth Provider - validate email and reset password email
The Email Auth Provider should support:
- [ ] When a user signs up, send a validation email
- [ ] When a user want to change their email, send a validation email
- [ ] When a user want to change their password, verify that the old password is correct
- [ ] When a user forgot their password, send a password reset email
- [ ] Refresh tokens
I'm looking for this feature too, exactly this 4 steps are missing. Beside that: if connected to different Oauth services like Facebook, Twitter a merging into the same User might be nice
Another nice feature would be to have a refreshToken of some sort. It sounds like the current token expires in 30 days.
In my case I would want the token to be refreshed for another 30 days automatically from my app every time the user opens the app - without requiring them to input username and password again.
I could store username and password on the client side - but would like to avoid that if possible.
More biz logic: Reset link expires after a short period of time Reset link is single use only
Thanks @mypark. That input is super helpful. Keep us posted with more thoughts. We'll reach out with an API proposal soon.
I would like to 1up this. Especially having no way to reset the password is painful.
Further, I'd like to remember that special use cases (expiration, single use of x-links, validation of password format, validation of username, validation of e-mail and so on) can be easily implemented as soon as #58 is in place.
Thanks for the feedback! We're currently working on integrating email/passwords in the updateUser mutation. Using the mutation and the permission system, you can then build an elaborate email/password workflow using microservices.
We will extend the updateUser mutation like this:
mutation {
updateUser(id: "existing-id", email: "optional new email", password: "optional new password")
}
You will be able to use the permission system to specify for example that only the user, only an admin or no-one should be able to update auth values.
We will store the new password securely, but not validate the new email
Hi @sorenbs it would be helpful for us developer to get a token for double-optin email auth. Any plans to include this?
Hi @dohomi !
Right now we will simply extend the updateUser mutation as described. We will not yet build the 5 features described in the original issue.
would your use case be solved by the 5 features in the original issue?
@sorenbs the most helpful feature would be a reset-password function which sends out an email with a token (valid for 12h) where a user clicks on it and can specify a new password. I simply don't like the idea of sending plain passwords through email around, it feels old-school and unprofessional and kind of unsecure as well.
The reset password updateUser mutation is great, but how can I validate that this user has the right to do so if he is not logged in?
With the new updateUser mutation you have the ability to build your own infrastructure around this use case, including generating the token as you described. And on the other hand, it's the first step in offering more elaborate workflows as described in this issue :slightly_smiling_face:
@marktani looking forward for this feature!
@sorenbs did you publish the updateUser mutation already with the described changes? Inside of the playground the autocompletion doesn't show password neither email yet.
That's not released yet, I'll write an update here when it's avaialbel :slightly_smiling_face:
still no update?
I'm curious about an update on the updateUser mutation as well - the updateUser mutation would be useful as the auth0 implementation has been causing me some grief and I'd prefer not to use the auth0 integration if possible.
This feature would be the most critical for my business: currently, users who have registered and have misplaced their passwords have to manually reach out to me, I delete their account, then they have to create a new account (and thus loose data currently associated with their account).
Thanks for staying on top of this everyone and sorry for the inconvenience here! :pray:
Amongst other exciting features, we recently pushed out multiple new data regions (see #61) which took longer than expected. We've been preparing a general approach to keep up with the feature requests surrounding authentication (including the features mentioned in this thread) and are now ready to fully commit on implementing it :slightly_smiling_face:
I hope you can hold out a little longer. Thanks for your patience! :raised_hands:
I hope this feature will be implement before my production release. Thanks graph.cool team!
With
mutation {
updateUser(id: "existing id", password: "new password")
}
Is it possible to require sending the old password for verification?
Related - for any field, is it possible to send both old and new values so we can use them in permission queries?
For example for my email verification flow I want to set isVerified to true and some secret to null, but only if the secret was known in the first place. I can probably solve this with two mutations but that won't always be the case.