Align sync auth with other SDKs
See original GitHub issueThe current auth API is hard to new users to understand and use. I suggest that Realm JS is aligned with the other Realm SDKs.
- The current methods (
registerWithProvider
,login
) are deprecated and to be removed as soon as possible. - A new class
Realm.Sync.Credentials
is added. It will interface supported 3rd party provides, e.g., JWT, Google and Facebook. - Methods for logging in and and logging out are added to
Realm.Sync.User
.
An example:
credentials = Realm.Sync.Credentials.facebook(getFacebookToken())
Realm.Sync.User.login(credentials, "http://objectserver.realm.io/auth").then(user => {
// user is now logged and and can open a Realm
}).catch(error => {
// an error has occurred and be handled
})
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Securing your Sync App | Twilio
In any Sync application, you have two levers of control that determine which SDK clients have access to what data. The first is...
Read more >User Authentication | Couchbase Docs
Provide a username and password to authenticate users. Auth Providers. sync gateway provides a turn-key solution to authenticate with Facebook or Google. For ......
Read more >Syncing Related Records | Mobile SDK Development Guide
Starting with Mobile SDK 5.2, Mobile Sync provides tools that let you sync parent records and their related records with a single call....
Read more >Set up authentication and sync - Alfresco Docs
Set up authentication and sync. Use this information to manage user authentication. Set up if users should be authenticated with the database, LDAP, ......
Read more >Interface: CustomAuthentication - Coda Pack SDK
Authenticate for custom, non-standard API authentication schemes by inserting one or more arbitrary secret values into the request (the body, URL, headers, or ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This could be related: https://github.com/realm/realm-js/issues/1571
I close this as #2002 has been merged and released.