@spree/docs 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,8 +63,10 @@ const { token, user } = await client.auth.login({
63
63
  password: 'secret123',
64
64
  })
65
65
 
66
- // Use the token for authenticated requests
67
- const orders = await client.orders.list({}, { bearerToken: token })
66
+ // Reuse the JWT for subsequent requests. setToken is sticky — every
67
+ // later call on `client` carries the bearer header automatically.
68
+ client.setToken(token)
69
+ const orders = await client.orders.list()
68
70
  ```
69
71
 
70
72
  ```bash cURL