Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy and consistent API for emailPassword methods #3943

Closed
kneth opened this issue Sep 6, 2021 · 0 comments · Fixed by #4041
Closed

Easy and consistent API for emailPassword methods #3943

kneth opened this issue Sep 6, 2021 · 0 comments · Fixed by #4041
Assignees

Comments

@kneth
Copy link
Member

kneth commented Sep 6, 2021

As reported in #3723, the API of Realm.Auth.EmailPasswordAuth.resetPassword() is not consistent between Realm Web and Realm JavaScript. Moreover, the TypeScript definition says on thing, and the API documentation says something else. The root cause is positional arguments (all strings) which is error prone for both our users and for ourself.

We should deprecate all current methods of Realm.Auth.EmailPasswordAuth (to be removed in version 11) and implement a new variant of the API:

callResetPasswordFunction({ email: string, password: string }, args: [BSON])
confirmUser({ token: string, id: string })
registerUser({ email: string, password: string })
resendConfirmationEmail({ email: string }) // for consistency
resetPassword({ password: string, token: string, id: string })
sendResetPasswordEmail({ email: string }) // for consistency

Methods should log a warning if called with deprecated signature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants