SyncUser.login with SyncCredentials.cloudKit always produces error


#1
CKContainer.default().fetchUserRecordID() { (recordID, error) in
  if let recordID = recordID {
    let creds = SyncCredentials.cloudKit(token: recordID)
    SyncUser.logIn(with: creds, server: authURL, onCompletion: { [unowned self] (user, err) in
...always produces error....
    })
  }
}

The above code always produce this error:

Error Domain=io.realm.sync.auth Code=601 “Your request parameters did not validate. provider: Invalid parameter ‘provider’!;” UserInfo={NSLocalizedDescription=Your request parameters did not validate. provider: Invalid parameter ‘provider’!;}

I know it worked at one point in the last week or so because I can see a realm created in the cloud using the cloudKit token.

Also, if I create a regular user on the cloud account, I can sync using those credentials, so the rest of my realm usage appears to be okay.

Any ideas what might be wrong?
Doug


#2

@dwsjoquist We do not support CloudKit for Cloud - you will need to use JWT

https://docs.realm.io/platform/using-synced-realms/user-authentication