Authentication Flow
1. Get a Token
To authenticate a user and get a JWT token:If you require to pass the user-agent header when making requests. Applying it when logging in must be done for the token to remain valid. If you decide to pass the user-agent header after, then the token will no longer be valid and you will have to request a new one.
2. Use the Token
Make authenticated requests using the token. Here’s an example using Cart endpoint to get the current user’s cart:3. Refresh Token
When the access token expires, use the refresh token to get a new one:4. Validate Token
To keep check of a valid token:cURL