I recently set up a Realm Object Server on Digital Ocean. I configured the server to use Facebook authentication.
I then wrote a simple iOS App to login with the Facebook iOS SDK and then I use Realm to login like this
let credentials = SyncCredentials.facebook(token: FBSDKAccessToken.current().tokenString)
SyncUser.logIn(with: credentials, server: URL(string: "http://000.000.00:9080/")!, onCompletion: { (user, error) in
print("User: \(user)")
print("Error: \(error)")
})
It works! Cool. I see these default realm's on my Object Server.
My understanding of these realms is that they are there for me to configure administrator / developer access. Am I wrong about this?
The User I just created got added to the /_admin
realm. Why? They are a user of my app, not any sort of admin. If this is the appropriate place for the user can I add other data under /_admin
-> User
object? How do I prevent the user from being created under /_admin
and created under my own User
object? Am I not understanding the Realm Object Server Architecture in this case?