Type Alias CustomerTokenCallback

CustomerTokenCallback: ((oldToken?: string) => Promise<string>)

A callback function that returns the customer token as a string inside a promise. It is expected that you implement a route in your backend, using your own auth method to secure API communication, and request a token from the TECSAFE API /jwt/saleschannel-customer. This function handles initial as well as consecutive token creation. If a previous token exists it must be handed in for proper session upgrading.

Type declaration

    • (oldToken?): Promise<string>
    • Parameters

      • OptionaloldToken: string

        The old token, if available.

      Returns Promise<string>

      A promise that resolves to the customer token.