- Ably FAQs
- Realtime API and client libraries
- Authentication
-
Account billing and packages
-
General
-
Realtime API and client libraries
-
Troubleshooting
-
Channels
-
REST API and client libraries
-
Ably error codes
-
Account and app setup and configuration
-
Ably architecture, transports, and security
-
Performance and Redundancy
-
Push Notifications
-
Integrations
-
Migrating to Ably from an existing service
Is it necessary to implement auto-renewal of tokens when using Token Auth?
Here's a little explanation of Token auth so you know how it works:
- Your server uses the Ably API key to request a 'Token Request' object from Ably
- Your client uses this 'Token Request' object to request the actual token from the Ably server every time it wishes to authenticate.
- These tokens are short-lived and expire after a certain period of time and the client is expected to keep requesting a new token to keep communicating with Ably.
- Using an authUrl or authCallback ensures your client automatically requests for a new token just before the previous one expires, making sure that the connection never drops due to authentication failure caused by an expired token.
Read the best practice guide for more such caveats or see a quick video to understand Ably's authentication methods better.
Note: The Ably SDK of your choice will automatically renew the auth token when it is within 30 seconds of expiry in order to ensure no loss of service.