Nickname Authentication Change & Getting Started Guide Update


(jay) #1

Heads up for nickname authentication change. Probably won’t affect many but if you’re in development it’s a little mysterious as to why you’re suddenly getting an auth error.

3.18.0

Deprecations

RLMIdentityProviderNickname has been deprecated in favor of RLMIdentityProviderUsernamePassword.

+[RLMIdentityProvider credentialsWithNickname] has been deprecated in favor of +[RLMIdentityProvider credentialsWithUsername].

Sync.nickname(String, Bool) has been deprecated in favor of Sync.usernamePassword(String, String, Bool).

That being said there was also an under-the-hood change (I believe) in a prior release that changed how nickname auth worked.

It was like this (Swift)

let creds = SyncCredentials.nickname("sally", isAdmin: true)

which no longer works, but this did (does)

let creds = SyncCredentials.nickname("sally")

So the quickstart guide documentation is wrong at this point. You’ll need to use the .nickname(“Sally”) version until they update the docs. You should be moving to the username / password authentication as well.

Hey Realm - update your docs please

https://docs.realm.io/sync/getting-started-1/ios-quick-start/step-1-my-first-realm-app#testing-authentication