question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Align sync auth with other SDKs

See original GitHub issue

The 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 classRealm.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:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nirinchevcommented, Dec 18, 2017
0reactions
knethcommented, Sep 21, 2018

I close this as #2002 has been merged and released.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found