Skip to main content
Version: Released

Tokens

When using the Storage Configurator in Anonymous mode πŸ”—, you will need to handle the lifecycle of your Authentication Token πŸ”—

For that purpose, you have two dedicated events: "TokenExpired" and "TokenRefreshed".

Event nameInput / OutputPayloadReason
TokenExpiredInput eventNone.To get notify when the current authentication token has expired.
TokenRefreshedOutput eventSee the description below.To send the new authentication token.

Example​

// Receive the project info.
configurator.addEventListener("tokenExpired", (event) => {
// Here your code to generate a new token

configurator.dispatchEvent(new CustomEvent("tokenRefreshed", { detail: newToken }))
});

Payload description​

Attribute nameTypeContent
tokenStringThe new authentication token.