Realm-cocoa: Social login doesn't work anymore

Created on 11 Feb 2019  路  7Comments  路  Source: realm/realm-cocoa

Goals

Continue logging in with Facebook and Google

Expected Results

Login with Facebook and Google works

Actual Results

Error (same for Facebook and Google):

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'!;}

Code Sample

// Facebook:
let credentials = SyncCredentials.facebook(token: token)
SyncUser.logIn(with: credentials, server: https://gr.us1.cloud.realm.io)

// Google:
let credentials = SyncCredentials.google(token: token)
SyncUser.logIn(with: credentials, server: https://gr.us1.cloud.realm.io)

Version of Realm and Tooling

ProductName: Mac OS X
ProductVersion: 10.14.3
BuildVersion: 18D109

/Applications/Xcode.app/Contents/Developer
Xcode 10.1
Build version 10B61

/usr/local/bin/pod
1.6.0
Realm (3.13.1)
RealmSwift (3.13.1)
RealmSwift (~> 3.13.1)

/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)

(not in use here)

/usr/local/bin/git
git version 2.19.2

Notes:

  • It happened on 3.7.5 as well
  • A few months ago both Facebook and Google login were working. I don't know if this was caused by a Realm version upgrade (e.g. from an older version to 3.7.5, or another older version) or not.
  • I reviewed the Facebook console configuration and re-generated the Google login id, no changes.
O-Community T-Help

Most helpful comment

@i-schuetz : You do have a point.
We intend to roll out Google/Facebook auth methods for the Cloud as well, though this might take till summer (since we need to do some pre-work).

All 7 comments

The Facebook and Google providers have never been enabled on Realm Cloud. Perhaps you were self-hosting ROS previously?

Oh, right, probably it stopped working since I moved to Realm Cloud. So it's not possible to use social login with it? When will it be?

We have generally steered customers toward using JWT auth as that is much more flexible than social login - e.g. you can host a lambda/azure function that accepts the social credentials, validates them against the provider of your choice, then signs a JWT that is then validated by ROS.

Honestly, I don't have time to host anything... This is why I'm using Realm Cloud... Is it unrealistic to ask for this kind of functionality to be provided out of the box? If yes, is there at least a tutorial somewhere to get the complete flow working?

You do realize that it is misleading to have methods in the client SDK to login with Facebook and Google which don't work when using Realm Cloud, right?

@i-schuetz : You do have a point.
We intend to roll out Google/Facebook auth methods for the Cloud as well, though this might take till summer (since we need to do some pre-work).

Hi there, we recommend users migrate to our v10 MongoDB Realm beta, as the above functionality is now deprecated.

Was this page helpful?
0 / 5 - 0 ratings