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.
If you do so, you can inform the authentication service about the new tokens in order to avoid generating additional tokens.
This is done by sending the following event:
{
"type": "AUTH.UPDATE_CREDENTIALS",
"payload": {
"token": "String!",
"refreshToken": "String!"
}
}
danger
Not notifying bus
about the new tokens will make it regenerate them on its own and use that internally. This will result in using two separate tokens in your app!