Skip to main content
Configure the Bijection deployment to verify tokens from Clerk. Set the issuer and audience for the application token in bijection/sign-in.ts. OIDC providers describes the configuration fields. Use Clerk’s React library to sign in, and the clerk() adapter from @bijectionhq/bijection/client to give the client its token:
template names the Clerk JWT template whose token the deployment verifies. Omit it to use Clerk’s session token. The adapter withdraws watch answers when Clerk starts loading again or changes the session, active organization, or reported session-token audience. It supplies no authenticated credential if the signed-in state lacks a session ID or the active organization is unknown. Use a fixed audience for a custom template. Clerk’s useAuth() exposes session-token claims, so use a custom ClientAuth if your template’s audience can change independently of the session or organization. In a server request, create a client with that user’s token using connect(url, { contract: "discover", token }). For access to protected application data, give the verified subject the roles your app requires. Use the verified principal, ctx.frame.as, for attribution.