Documentation Index
Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt
Use this file to discover all available pages before exploring further.
connect()
Run headless OAuth from a CLI or notebook. Opens a browser, polls until the user finishes.
Signature
Parameters
| Name | Default | Notes |
|---|---|---|
providers | None | Restrict the picker. None = any allowed by the app config. |
grant_policy | None | Set max TTL on the resulting grant. |
timeout | 300.0 | Seconds to poll before raising ConnectTimeoutError. |
poll_interval | 2.0 | Seconds between polls. |
open_browser | True | Set False over SSH; the SDK prints the URL to copy. |
Returns
list[ConnectResult] — one per connected account. Each item carries grant_id, provider_id, account_identifier, scopes.
Raises
ConnectFlowError, ConnectDeniedError, ConnectTimeoutError, ConnectConfigError.
Example
authenticate()
Open the IDP’s sign-in flow and return the resulting JWT.
Signature
Returns
AuthResult with user_token and user_info.
Example
create_connect_session()
Build a connect URL backend-side; redirect the user there or hand it to a frontend popup SDK.
Signature
Returns
ConnectSession with session_token and connect_url. Pass session_token to the Connect.js SDK or redirect to connect_url.
Example
verify_user_token()
Verify a JWT against the configured IDP without making a provider call.
Signature
Returns
The verifiedsub claim, or None if invalid.
Example
See also
- OAuth → Headless
- OAuth → JWT identity
- Types —
ConnectResult,AuthResult,ConnectSession,GrantPolicyInput.