External providers

This article contains instruction to implement third parties approaches to authenticating a customer in a mobile application.

Facebook Login


For those Applications that rely on Facebook Login as authentication, Synerise has a separate method that provides you with a Synerise JWT token based on Facebook login. Currently, there are no dedicated settings related to Facebook authentication on the user interface in the Synerise platform. You just have to implement RESTful API or SDK methods to authenticate through Facebook.

To authenticate a customer using Facebook, implement the following methods:

OS Method
Android - Client.authenticate()
iOS - Client.authenticate(token:clientIdentityProvider:authID:context:success:failure:)
- Client.authenticateConditionally(token:clientIdentityProvider:authID:context:success:failure:)
React Native - Synerise.Client.authenticate(token, clientIdentityProvider, authID, context, onSuccess, onError)
- Synerise.Client.authenticateConditionally(token, clientIdentityProvider, authID context, onSuccess, onError)
Flutter - Synerise.client.authenticate(clientAuthContext, clientIdentityProvider, token))
Note: authId/authID parameter is used for decreasing the number of UUID refreshes, so it must be unique for every customer.

Additionally, in the Synerise platform (app.synerise.com) you can define the following settings:

Sign in with Apple


For integrating with the Apple platform, Synerise has a separate method that returns a Synerise JWT token based on Sign in with Apple credentials. You can read more about the configuration of the Sign in with Apple option in the Synerise platform here.

In this case, the authentication process works in the following way:

  1. A customer authenticates by Sign in with Apple.
  2. Apple provides authentication credentials.
  3. Your app uses these credentials and creates ClientAppleSignInAuthenticationContext.
  4. The context is passed to Synerise by using:
    OS Method
    iOS - Client.authenticate(token:clientIdentityProvider:authID:context:success:failure:)
    - Client.authenticateConditionally(token:clientIdentityProvider:authID:context:success:failure:)
    React Native - Synerise.Client.authenticate(token, clientIdentityProvider, authID, context, onSuccess, onError)
    - Synerise.Client.authenticateConditionally(token, clientIdentityProvider, authID context, onSuccess, onError)
    Flutter - Synerise.client.authenticate(clientAuthContext, clientIdentityProvider, token))
Note: authId/authID parameter is used for decreasing the number of UUID refreshes, so it must be unique for every customer.
  1. If the authentication was successful, Synerise provides your application with our JWT access token for the customer.

Additionally, in the Synerise platform (app.synerise.com) you can define the following settings:

The list of methods


Check if a customer is signed in

This method checks if a customer is signed in through oAuth, Facebook, Sign in with Apple, or RaaS.

Important: This method returns false if a customer is authenticated through Simple Authentication.
OS Method
Android Client.isSignedIn()
iOS Client.isSignedIn()
React Native Synerise.Client.isSignedIn()
Flutter Synerise.client.isSignedIn()

Customer sign out

This method signs out the customer. The method terminates the JWT token and ends the customer session.

OS Method
Android - Client.signOut()
- Client.signOut(mode, signOutFromAllDevices)
iOS - Client.signOut()
- Client.signOut(mode:fromAllDevices:success:failure:)
React Native - Synerise.Client.signOut()
- Synerise.Client.signOutWithMode(mode, fromAllDevices, onSuccess, onError)
Flutter Synerise.client.signOut()

What’s next


When the customer’s is signed in, you can implement profile management methods and session management methods.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker