Hi all! I have database and collection. In my collection I have some data which I want display in app. Do I need register user first to get access to collections? Right now I’m authentication user with anonymous credential. if auth success I’m opening database with partitionValue. I wonder is it possible to open database without any authentication? If not is it possible to change anonymous user to as a Email/Password user? I also implemented Email/Password registration and login. But I have 2 users 1) anonymous user, 2)Email/Password user. I wan’t change anonymous user as a registered user
My understanding of Realm is that in order to open a Realm, you need a configuration object, and in order to create a configuration object, you need a logged in user (anonymous or otherwise). You can always log in as an anomymous user, display stuff, and then logout prior to loging in again as a email/password user. MongoDB Realm can support multiple authentication providers, so this should not be a problem.
To add slightly to Richard’s answer – within Realm you also have the option to Link User Identities. This should allow you to start with an anonymous user and then link an email/password identity when the user creates it (giving you two separate identities linked to a single User/ID).
Thank you very much Mr. Richard Krueger! I understood that before to get access to any database or collection I have to setup user auth first. But it’s hard to me to understand turn Anonymous user to Email/Password user. I won’t want have user have 2 different account, 1) Anonymous 2)Email/Password. I read MongoDB removes anonymous users credentials if user has no activity.
Thank you very much! I didn’t knew about Link User, I think there was no mentioned on Task Tracking tutorial.