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

Convert Realm Cloud Anonymous User into an authenticated User

      <!---
      When you login as an anonymous user on realm cloud using this snippet

      await Realm.Sync.User.login(REALM_SERVER_URL, Realm.Sync.Credentials.anonymous());

      A new user is created with a random id.

      When the user than decides to register/login, how can I "transform" that user in a regular user?
      -->

      Goals

      Being able to transform an anonymous user to a regular user.

      Expected Results

      I cannot find anywhere in your docs how to do this

      The api would look like

      let currentUser=Realm.Sync.User.current
      if(currentUser.isAnonymous()){
          currentUser.authenticate(provider)
      }
      

      Actual Results

      It appears there is no way to do that

      Version of Realm and Tooling

      • Realm JS SDK Version: 2.22.0
      • Node or React Native: react-native 0.57.0

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: