Connect to your own API
Secure backend access with OIDC federation is available on all plans
To configure your own API to accept Vercel's OIDC tokens, you need to validate the tokens using Vercel's JSON Web Keys (JWTs), available at with the team issuer mode, and for the global issuer mode.
Install the following package:
In the code example below, you use the function to verify the token. The , , and are validated against the token's claims.
Make sure that you:
- Replace with your team identifier from the Vercel's team URL
- Replace with your project's name in your project's settings
- Replace with one of Vercel's environments, , or
Install the following package:
In the code example below, the function is used to retrieve the OIDC token from your Vercel environment. You can then use this token to authenticate the request to the external API.
Was this helpful?