How do I authenticate my users with the Layer service?

Layer implements a federated authentication flow, which means that it’s up to you to verify user login credentials, and then tell Layer that the user should be authenticated. This means that you must provide a custom service to verify user credentials. We do not provide this functionality.

At a high level, there are three main steps in the authentication flow:

  1. You request a nonce from Layer, which is a unique string used to identify a single authentication request.
  2. Your authentication provider uses this nonce and your user's login credentials to generate and sign an identity token, then sends it back to your app.
  3. Your app sends this identity token to Layer and we authenticate that user into our system.

For complete authentication and identity token information, please see our Authentication documentation (Android, iOSWeb).


Have more questions? Submit a request