Closed zeeshanz closed 5 years ago
In the docs, at this URL https://docs.realm.io/sync/using-synced-realms/user-authentication/username-password-provider the example for the login is not correct. It should be SyncUser.logInAsync(...) instead of SyncUser.login(...)
String authURL = "https://myinstance.cloud.realm.io"; SyncCredentials credentials = SyncCredentials.usernamePassword(username, password, false); SyncUser.login(credentials, authurl, new SyncUser.Callback<SyncUser>() { @Override public void onSuccess(SyncUser user) { // User is logged } @Override public void onError(ObjectServerError error) { // Handle error } });
Fixed
In the docs, at this URL https://docs.realm.io/sync/using-synced-realms/user-authentication/username-password-provider the example for the login is not correct. It should be SyncUser.logInAsync(...) instead of SyncUser.login(...)