Clears all regular (non-admin) tokens from TokenManager.
Returns the current access token. Always call this at point-of-use so you get the live value from the singleton rather than a value captured at render/effect time that may have gone stale after a token refresh.
Returns { access, refresh } token strings for backward compatibility.
The authoritative store is TokenManager.
Returns true if the user has a valid access token (via TokenManager).
Store access + refresh tokens. Delegates to TokenManager so that
expiry-based proactive refresh, cross-tab sync, and deduplication all
work automatically.
Raw access token string.
Raw refresh token string.
OptionalaccessExpires: stringOptional ISO-8601 expiry for the access token.
OptionalrefreshExpires: stringOptional ISO-8601 expiry for the refresh token.
Staticget
Singleton class to manage API tokens.
Token storage now delegates to
TokenManagerso there is a single source of truth for token state. TheApiclass is kept for backward compatibility but thin-wrapsTokenManagerfor all token operations.