realm-js
realm-js copied to clipboard
API for confirming user's current password
Problem
When using the Email/Password Auth Provider there is no way of asking the user to confirm his/her current password. This would be nice to have in the following use-cases:
- Allow login with a username additionally to the email/username provided on registration.
- Confirm current password when setting a new password as a first check before sending the confirmation link
- ... (some other use-cases where confirming the current password would be useful)
Solution
Something like await app.emailPasswordAuth.confirmCurrentPassword(password)
would be nice to have.
Alternatives
For login with an additional username there is currently no alternative, as far as I know. For resetting password there is the confirmation link sent via email or something else.
How important is this improvement for you?
I would like to have it but have a workaround
Feature would mainly be used with
Atlas App Services: Auth or Functions etc
@devsales Thank you for the proposal/feature request.
You are right - we don't have such a method at the moment - neither in the SDK nor server-side. My best idea for now is to try to log in the user and see if it fails.
I can't give you a timeline for when we will work on your request, and I will leave the issue open. To other users: if you could use something similar to this, consider explaining your use case and/or give the issue a 👍🏻