We are going through the getting started guide (crafting a macOS app) and are getting an authentication failure when attempting to sign up
Signup failed: Error Domain=realm::app::ServiceError Code=-1 "authentication via 'local-userpass' is unsupported" UserInfo={NSLocalizedDescription=authentication via 'local-userpass' is unsupported, realm::app::ServiceError=Unknown}
So to double check ourselves, we downloaded the repo project, built and ran it and got the exact same error.
We’ve checked the Atlas->Realm project console, in the Users->providers section and both Anonymous sign in as well as Email/Password are On and configured.
We know it’s the correct AppID as the log is showing the login attempts failing. I am not including the code as it’s the code in the repo project itself
The error log from the console shows this
Error:
authentication via ‘local-userpass’ is unsupported
Thoughts?
Edit:
Since anonymous sign is On in the console we tried to use anonymous login using the code from the iOS SDK’s section
app.login(withCredential: AppCredentials.anonymous()) { (user, error) in
// Remember to dispatch back to the main thread in completion handlers
// if you want to do anything on the UI.
DispatchQueue.main.sync {
guard error == nil else {
print("Login failed: \(error!)")
return
}
// Now logged in, do something with user
}
}
which results in this error
Login failed: Error Domain=realm::app::ServiceError Code=2 “authentication via ‘anon-user’ is unsupported” UserInfo={NSLocalizedDescription=authentication via ‘anon-user’ is unsupported, realm::app::ServiceError=InvalidSession}