Init
Initializing the auth manager, allows you to be notified whenever the token
gets refreshed or when the refreshToken
expires.
In order to initialize this module, we recommend that you use BUS.INIT
event.
This is done by sending the following event:
{
"type": "BUS.INIT",
"payload": {
"services": ["AUTH"]
}
}
Token refreshed
Each time the token gets refreshed you'll receive:
{
"type": "AUTH.TOKEN_REFRESHED",
"payload": {
"idToken": "String!",
"refreshToken": "String!"
}
}
This could be useful for you if you're application is interacting with our Public API.
Refresh token expired
When the refresh token expires and become invalid (after 90 days of its creation), the user will be automatically logged out and you'll receive:
{
"type": "AUTH.REFRESH_TOKEN_EXPIRED"
}