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

Realm Web: Persist and retrieve anonymous users

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      <!---

      Questions: If you have questions about HOW TO use Realm, please ask on
      StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
      We monitor the realm tag.

      Feature Request: Just fill in the first two sections below.

      Bugs: To help you as fast as possible with an issue please describe your issue
      and the steps you have taken to reproduce it in as much detail as possible.

      -->

      Related to https://github.com/realm/realm-js/issues/2964#issuecomment-673222982.

      Just started playing with realm-web on React and if I log in with anonymous credentials, at each page refresh a new set of profile/accessToken/refreshToken is created, absolutely cluttering localStorage.

      Sample code here (open the app in new window).

      For some reason the fix provided by https://github.com/realm/realm-js/pull/2990 doesn't seem to work for anonymous credentials.

      This problem is nonexistent with Stitch Browser SDK, since its AnonymousCredential makes use of ProviderCapabilities with reusesExistingSession = true. Therefore initializeDefaultAppClient uses existing anon user from localStorage

      Is that possible with realm-web?

            Assignee:
            kraen.hansen@mongodb.com Kræn Hansen
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: