Authenticate users via token exchange for user impersonation and widget authentication.
User token authentication lets your application act on behalf of a specific user. It connects to a dedicated OIDC application (such as Nail It or another VSP), and the resulting token is scoped to that user’s permissions only.This flow has two parts: token exchange for API access, and widget tokens for embedded UI components.
Tesouro supports OAuth 2.0 Token Exchange (RFC 8693). Your application exchanges a user JWT from your OIDC provider for a Tesouro access token scoped to that user.
For embedded widgets, your backend generates a widget token — an encrypted JWE (RFC 7516) that securely wraps the user’s identity and OAuth credentials. This token is passed to the widget on the frontend.Your backend must provide:
The user’s identity (ID and email)
Your OAuth client credentials
A token expiration that matches your security requirements