- New users can review the Abilities your App is requesting and configure Vincent Policies
- Returning users can log in and confirm their identity and authorized App Version
Authentication Flow
1
Redirect to Connect Page
Your App redirects users to the Vincent Connect Page
2
User Reviews and Configures
Users review requested Abilities and configure Policies
3
Return with JWT
Upon approval, users return to your App with a signed JWT
4
Verify and Store
Your App verifies and stores the JWT for authenticated requests
Vincent JWT
The JWT proves user authentication via their Vincent Wallet and grants your App permission to act on their behalf.JWT Structure
Standard JWT header containing algorithm and type information
Signature from User’s Vincent Wallet proving the JWT was signed using their wallet
The raw, unsigned payload string used during signing
To access these claims, use
decodeVincentJWTFromUri
in your frontend.JWT Contains
The Vincent JWT containing authentication and authorization details.
Setting Up the Web App Client
Creates a Vincent Web App Client instance
Handling Authentication
Checks if the current URL contains a Vincent JWT
Extracts and validates JWT from URL
Removes the Vincent JWT query parameter from the current URL
Redirects user to Vincent Connect Page for authentication
Checks if a JWT has expired
The
redirectUri
must be one of your configured Authorized Redirect URIs.Backend Verification
Always verify JWTs submitted to your backend:Verifies a Vincent JWT on your backend
The verify method will throw an error if the JWT is invalid, expired, or mis-scoped.
FAQ
What happens when a JWT expires?
What happens when a JWT expires?
When a JWT expires, you’ll need to redirect the user back to the Vincent Connect Page using
redirectToConnectPage()
. Returning users will be able to quickly re-authenticate and get a new JWT without reconfiguring their Policies.Can I use the same JWT across multiple domains?
Can I use the same JWT across multiple domains?
No, JWTs are scoped to specific redirect URIs for security. Each domain needs its own JWT obtained through the Vincent Connect flow with that domain as the redirect URI.
How long are JWTs valid?
How long are JWTs valid?
JWT expiration is set by the Vincent platform. Check the
exp
claim in the JWT to see when it expires (timestamp in seconds since Unix epoch).Do I need to verify JWTs in my frontend?
Do I need to verify JWTs in my frontend?
The
decodeVincentJWTFromUri
method automatically validates JWTs in your frontend. However, you MUST always verify JWTs on your backend using the verify
function before processing authenticated requests.What's the difference between new and returning users?
What's the difference between new and returning users?
New users will see your App’s requested Abilities and can configure Policies before granting permission. Returning users who have already authorized your App will simply confirm their identity and the App version they’ve authorized.
Can users revoke access to my App?
Can users revoke access to my App?
Yes. If access is revoked, the user will need to repermit the app before they can generate a new JWT for it. Execution of Vincent Abilities on their behalf will also fail.