Authentication
The authentication service allows you to:
- Use the available authentication strategies
- Persist the user session
- Grab current authenticated user
Usage
All the interactions that you will have with the system rely on a token
which allows our backend services to know if the user is allowed to perform specific actions.
For security purposes, this token
has a Time-to-live (TTL) of 15 minutes. The good news is that the authentication service automatically generates a new token
when the previous one expires and uses it with all the services that depend on it.
Also, if the user doesn't explicitly log out from the system, they can use the token for at most 90 days, once this is exceed, the user will be automatically logged out and we'll be asked to log in again.
📄️ Init
Initializing the auth manager, allows you to be notified whenever the token gets refreshed or when the refreshToken expires.
📄️ Authenticating with e-mail and password
If you want to start using Aircall ecosystem, you would need to authenticate your agents, and one of the classic ways of doing so, is by using e-mail/password strategy.
📄️ Update credentials
As explained before, it can happen that your application uses other backend services which are not yet exposed by bus 🚌. In this case, you will need to generate a new idToken when it expires.