Easy and consistent API for emailPassword methods

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            Tom Duncalf (Inactive)
            Reporter:
            Kenneth Geisshirt (Inactive)
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: