Support

How does authentication work?

Overview

When a user authenticates with the Layer service, they are effectively "logged in". A copy of all their conversations and messages will dowloaded and stored in a local database, and all sent messages will be attributed to that user.

When handling user management, keep the following in mind:

 

Authentication flow

The authentication process ensures that you have complete control over user registration and login. It also guarantees, through the identity token generated by your web service, that only authorized users can communicate through Layer.

The authentication flow:

  1. The client connects to the Layer service
  2. The client requests authentication
  3. Layer generates a nonce and returns it to the client
  4. The client receives the nonce, and passes it to your authentication web service
  5. Your authentication web service returns an Identity Token to the client
  6. Client sends the Identity Token to the Layer service
  7. Client receives a callback indicating authentication success or failure

 

Have more questions? Submit a request