Watch keynotes and sessions from MongoDB.live, our virtual developer conference.

Help. Login Stuck on IOS, Safari

Hi everyone,
i hope i’m not misusing this forum. A mongoDB employee pointed me here to try solve my issue.

I am currently using Mongo Stitch with Realms to provide a basic backend for a web app i developed.
Everything is done and working properly on Android Browsers or Maijor PC browser.

The only problem is, on Safari (i tested it on iPad 7 and iPhone 8 ) the login does not work.

I found that it waits forever on this call:

await client.auth.loginWithCredential(new stitch.UserPasswordCredential(email, password));

The client var is inited with: const client = stitch.Stitch.initializeDefaultAppClient(APP_NAME);

It seems that the Stitch client manages to set the client.auth.user.id, but it does not arrive to the point were it sets the “__stitch” variables in the localStorage.

Has anyone experienced this?
The code should be fine on my side, since it works properly on Android/Windows…

Is it a Stitch bug?

I appreciate any support,
Thanks.

In case anyone has this issue, for me was fixed by removing the custom data from the realm app.

Instead i now get it using a findOne as secondary step right after login.