User Identification

Anonymous Users

When you properly initialize the SDK within your own application, on first start a UUID is generated and a JWT token is retrieved for “anonymous client”.

Such a token is required to sign all the events that are being passed to Synerise, but its permissions are limited to the following:

  • Tracking events
  • User registration
  • User sign-in
  • User password reset

This is the minimum required to use the basic features of the SDK.

The user in this scenario is fully anonymous within the system and the profile does not contain any personal information.


Recognized Users

If you want to operate without full authentication, but still record personal information, you can do it without authentication as well.

You may have already imported client data into Synerise and you have personal information in the system. This data can be used to link mobile-related events to a user.

To achieve this, you need the add a customId or email parameter to the events and allow our backend systems to properly link events with corresponding persons.

You can do it by passing the custom identifier:

Synerise.Tracker.setCustomIdentifier("YOUR_CUSTOM_IDENTIFIER");

Or by passing the email:

Synerise.Tracker.setCustomEmail("YOUR_CUSTOM_EMAIL");
Note: Remember, according to our JWT token philosophy such a user is still anonymous and will not have access to features other than the ones mentioned in Anonymous Users section above.

Authenticated Users

Synerise also offers a means to fully authenticate users and open full User sessions with a JWT token that has access to all the features provided by Synerise.

Registration as a Service

Registration as a Service (RaaS) is a set of methods that enable you to implement full user management in your application without any need for third party systems. So let’s take a look how to implement these in sections below:

New user registration

If you want to use our RaaS (Registration as a Service) you can implement the Synerise.Client.registerAccount() method.

This method provides you an option to pass all of the user information along with any agreements and attributes at once.

Please note that the email address is the primary unique identifier.

Depending on backend configuration at Synerise, registration may or may not require email confirmations.

Currently, we support the following registration behaviors:

  • Automatic: the account is ready to use right after registration, no confirmations are required. User has the snrs_email_confirmed attribute set to false.
  • Email Confirmation Required: account is ready to use right after registration, but email confirmation is required and changes the snrs_email_confirmed attribute to true in the customer profile.
  • Email Activation Required: an activation email is sent and the account can only be used after activation. Activation changes the snrs_email_confirmed attribute to true in the customer profile.

Password

  • The default password policy is a minimum of six characters, including at least one of each:
    • uppercase letter
    • lowercase letter
    • digit
    • non-alphanumeric character
  • Passwords are PBKDF2-encrypted.

User sign in

Once your user registers, they can log in. Logins are implemented using this method: Synerise.Client.signIn().

On success, the application receives a JWT token which is valid for 1 hour (depending on backend configuration).

The SDK refreshes that token while the user is working in the application and events are being sent (auto-refresh occurs only while the token is still valid).

Note: Token longevity can be changed on request.

User sign out

Signing out uses the following method: Synerise.Client.signOut().

When called, this method terminates the JWT token and effectively kills the user session.

Get User account details

After login, you may want to present the user their profile details. This is done by using Synerise.Client.getAccount().

This method retrieves all user information that’s available in Synerise.

Update User account details

You can also let users update their profile information. The method for this is Synerise.Client.updateAccount().

With this method, a user can update most of their information, with the exception of email, because it’s used as the primary identifier for an account.

Change Users password

Separately from user information updates, a user may want to update their password. This is done with the Synerise.Client.changePassword() method.

Note that as a security measure, entering the current password is required.

For a full list of available methods, see our Methods Reference.

😕

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.