Retrieves a valid access token for the integration. Automatically refreshes the token if it has expired or is about to expire.
This function requires Squid to be initialized with an API key
The user-specific identifier that was used when saving the auth code.
A promise that resolves with a valid access token and its expiration time.
Takes an auth token, potentially exchanges the auth token with an external api depending on the external auth, and stores the result in Squid's secure storage.
This function requires Squid to be initialized with an API key
The authorization code obtained from the auth provider's callback.
A user-specific identifier (usually a user ID) to associate with the tokens. This allows multiple users to connect their own accounts to the same integration.
A promise that resolves with the access token and its expiration time.
Client for managing authentication tokens for external integrations.
Provides methods for saving and retrieving auth tokens for external services.