workosProvider wires authentication through WorkOS AuthKit, so your tools receive a signed-in WorkOS user.
Example
server.ts
Signature
Parameters
opts
-
domainis the AuthKit domain, for exampleacme.authkit.app. -
audienceis the Resource Indicator configured in the WorkOS dashboard, typically this server’s public URL. AuthKit binds it into the token’saudclaim.
CustomProviderOptions options: baseUrl, serverUrl, scopes, requiredScopes, and metadataOverrides.
Requires Dynamic Client Registration enabled in the WorkOS dashboard (Connect → Configuration).
Returns
APromise for the OAuthConfig you pass to the oauth constructor option.
Connect an Identity Provider
Set up sign-in with a hosted provider
Authenticate Users
Add sign-in to your app end to end
customProvider
Wire OAuth from any IdP’s discovery document