Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1305

Easy and consistent API for emailPassword methods

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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@mongodb.com Tom Duncalf (Inactive)
            Reporter:
            kenneth.geisshirt@mongodb.com Kenneth Geisshirt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: