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.
Prerequisites
Before starting, make sure the following are in place:- An Alter Vault account with an application created in the Developer Portal
- An Auth0 tenant or Clerk application (or any OIDC-compliant identity provider)
- The Python SDK or TypeScript SDK installed
Setup Steps
https://your-tenant.us.auth0.com or https://your-app.clerk.accounts.dev)One IDP per app at a time. Each application can have only one active identity provider configuration. To switch providers, remove the existing IDP configuration and then add the replacement.
Auto-detection: Alter Vault recognizes Auth0 and Clerk from the issuer URL and automatically configures the correct claim mappings. Any other OIDC-compliant provider defaults to
custom_oidc and uses the standard sub claim.Claim mappings lock after first user sign-in. The user ID claim, group claim, and role claim cannot be changed once the first user authenticates through the identity provider. If the IDP does not include group or role claims by default (e.g., Auth0 requires a custom Action), leave these fields empty and set them before any user signs in.
When the application makes API calls through Alter Vault, include the end user’s JWT issued by the identity provider. This lets Alter Vault identify the user and enforce access policies.
Automatic sync: The first time Alter Vault sees a JWT for a new user, it automatically creates a user record and syncs group memberships from the JWT claims. Subsequent requests update the user’s profile.
To let end users sign in through the IDP --- for
vault.authenticate() in the SDK or the Wallet dashboard --- configure OIDC client credentials.What this enables: Once configured, the SDK’s
vault.authenticate() method opens a browser-based login flow through the IDP, and the Wallet dashboard gains a sign-in page for end users. User accounts are created automatically on first authentication. Auth0
- Go to Auth0 Dashboard → Applications → Applications and click Create Application
- Choose Regular Web Application (not SPA --- the callback goes to the Alter Vault backend)
- In the app’s Settings tab, paste both redirect URIs into Allowed Callback URLs (comma-separated)
-
In the same Settings tab, paste the Wallet logout URL shown in the Developer Portal into Allowed Logout URLs.
Without this step the Wallet’s “Sign out” button cannot return users to the sign-in page after Auth0 clears its session, and end users cannot switch accounts.Use the bare URL with no query parameters. Auth0 exact-matches this field, so
https://wallet.alterauth.com/sign-inworks buthttps://wallet.alterauth.com/sign-in?appId=…will be rejected. Alter Vault sends theappIdthrough the OIDCstateparameter, which Auth0 echoes back automatically --- no per-app URL is needed.Example: if the Wallet callback shown in the Developer Portal ishttps://wallet.alterauth.com/api/auth/callback, the logout URL ishttps://wallet.alterauth.com/sign-in. - Copy the Client ID and Client Secret from the same Settings page into the Developer Portal
Clerk
- In the Clerk Dashboard, go to Configure → OAuth Applications (requires a production instance)
- Create a new OAuth application and add both redirect URIs from the Developer Portal as allowed callbacks
- Copy the Client ID and Client Secret into the Developer Portal
Clerk’s JWT issuer URL follows the pattern
https://your-app.clerk.accounts.dev for development instances or https://clerk.your-domain.com for production instances with a custom domain.For real-time user lifecycle sync, enable webhooks so the identity provider pushes
user.deleted and user.suspended events to Alter Vault. The setup differs by provider because Clerk (via Svix) generates its own signing secret, while Auth0 accepts any shared token. Auth0
- In Developer Portal → the app’s Identity page → Webhooks section, click Enable Webhooks. Copy the generated signing secret (shown only once) and the webhook endpoint URL.
- In Auth0 Dashboard → Monitoring → Streams, create a new Custom Webhook log stream.
- Paste the webhook endpoint URL as the Payload URL.
- Paste the signing secret into the Authorization Token field.
- Filter the stream to
sdu(user deleted by admin),ublkdu(user blocked by admin), andubuu(user unblocked by admin) events. These are the three admin-initiated lifecycle events Alter Vault acts on; login events (sul) and rate-limit events (limit_sul) are intentionally ignored because they are not per-user lifecycle changes. - Save the log stream.
Clerk
Clerk generates the signing secret inside the Clerk Dashboard, so the flow is reversed: create the endpoint in Clerk first, then paste its signing secret into the Developer Portal.
- In Developer Portal → the app’s Identity page → Webhooks section, note the Webhook URL shown for the app.
- In Clerk Dashboard → Webhooks, click Add Endpoint and paste the webhook URL as the endpoint URL.
- Subscribe to
user.updated,user.deleted, andorganizationMembership.deletedevents. - Clerk displays a Signing Secret for the endpoint (starts with
whsec_). Copy it. - Back in the Developer Portal, toggle Enable Webhooks and paste the signing secret into the dialog, then Save Secret.
Auth0 only — save the generated signing secret immediately. The Developer Portal displays it once when webhooks are enabled. If lost, use Rotate Secret to generate a new one (the old one is immediately invalidated). Clerk signing secrets live in the Clerk Dashboard; re-copy them from there if needed.
What Happens Behind the Scenes
When the application passes a JWT or the identity provider sends a webhook event:- User identity is resolved — Alter Vault maps the JWT
subclaim to an internal user record - Groups are synced — Group memberships from JWT claims are synced to Alter Vault
- Connections are linked — OAuth grants are associated with the user for lifecycle management
- Policies are evaluated — Group-based access policies can restrict which providers a user can access
- User status is set to
deprovisioned - All linked OAuth grants are immediately revoked
- All stored tokens are permanently deleted
- Subsequent token requests for this user are denied
Next Steps
- Supported Providers — Provider capabilities and claim conventions