- Connect page redirection
- Authentication helpers that are browser-specific
Properties
decodeVincentJWTFromUri()
decodeVincentJWTFromUri: (Defined in: app-sdk/src/webAuthClient/types.ts:83expectedAudience
) =>Promise
<null
| {decodedJWT
:VincentJWTAppUser
;jwtStr
:string
; }>
Function
Extracts a decoded/parsed Vincent JWT (JSON Web Token) from the current window location
The token is verified as part of this process; if the token is invalid or expired, this method will throw.
See: WebAuthClient.redirectToConnectPage for example usage
Parameters
expectedAudience
string
Provide a valid redirectUri
for your app; this is typically your app’s origin
Returns
Promise
<null
| { decodedJWT
: VincentJWTAppUser
; jwtStr
: string
; }>
null
if no JWT is found, otherwise both the decoded jwt and the original JWT string is returned
Throws
If there was a JWT in the page URL, but it was invalid / could not be verifiedredirectToConnectPage()
redirectToConnectPage: (Defined in: app-sdk/src/webAuthClient/types.ts:54redirectConfig
) =>void
Function
Redirects the user to the Vincent Connect page.
If the user approves your app permissions, they will be redirected back to the redirectUri
.
Use WebAuthClient.uriContainsVincentJWT to detect if a user has just opened your app via the Connect page
Use WebAuthClient.decodeVincentJWTFromUri to decode and verify the VincentJWTAppUser from the page URI, and store it for later usage
NOTE: You must register the redirectUri
on your Vincent app for it to be considered a valid redirect target
Parameters
redirectConfig
RedirectToVincentDelegationPageParams
Returns
void
Example
removeVincentJWTFromURI()
removeVincentJWTFromURI: () => void
Defined in: app-sdk/src/webAuthClient/types.ts:112
Function
Removes the Vincent connect JWT from the current window URI.
This is useful for cleaning up the URL after decoding and storing the JWT,
ensuring the redirect URL looks clean for the user and no sensitive information
is exposed in the URI.
Returns
void
Example
uriContainsVincentJWT()
uriContainsVincentJWT: () => boolean
Defined in: app-sdk/src/webAuthClient/types.ts:68
Function
Determines whether the current window location contains a Vincent JWT
You can use this to detect if a user is loading your app as a result of approving permissions
on the Vincent Connect page — e.g. they just logged in
See: WebAuthClient.redirectToConnectPage for example usage
Returns
boolean
true
if the current window URI contains a Vincent JWT, otherwise false
.