Client auth token expiration
Udi Ben Amitai
Apr 10
Hey community :)
Is there an expiration period for client auth token?
If so - what is the best practice to renew the token in a React application?
In the example here: https://docs.cord.com/get-started/integration-guide/generate-an-auth-token
The token is only generated once when the app renders.
In other libraries that require auth token, there's an option for token providing function where invalidation can occur.
Adam Vartanian
Apr 10
SolutionHi Udi! We only need a token signed by you at SDK initialization time. Once the SDK is initialized, the SDK internally handles refreshing the auth token with our servers. Because of that, you generally want to sign a token with a short expiration time (our server libraries default to 1 minute) right at page render time.