JWT headers
When generating a customer token, the values in the JWT header are constant and never change:JSON
JWT payload
When generating a customer token, the payload of the JWT should be dynamic, e.g.JSON
aud— The intended recipient of the JWT (should always beapi.smile.io).sub— An identifier for the currently logged-in customer (see notes below).exp— When the JWT expires (recommendation: 5 minutes after JWT is generated).
Customer identifiers (sub values)
You can identify the logged-in customer by providing a sub claim in the payload of the JWT in one of the following supported formats. Choose the appropriate format based on which unique identifier you have available for the currently logged-in customer.