Build the authorize URL and persist the PKCE verifier keyed by state.
Handle the redirect-callback URL. Validates state, retrieves the saved
verifier, exchanges the authorization code + verifier for tokens, and
persists them. Returns the access TokenRecord.
Exchange a stored refresh token for a fresh access token. Throws if no refresh token is available.
Get the current access token if valid (refreshing first if expired and a
refresh token is available). Returns null when no usable token exists.
Forget tokens (logout). Does NOT call any remote revocation endpoint.
OAuth 2.0 Authorization Code + PKCE client.
Remarks
Storage layout under the supplied TokenStore (all keys namespaced):
oauth:tokens:{clientId}→ access token recordoauth:refresh:{clientId}→ refresh token record (no expiry)oauth:verifier:{state}→ in-flight PKCE verifier (10 min TTL)