Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@vercel/oidc

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/oidc

Runtime OIDC helpers intended for use with Vercel Functions

latest
Source
npmnpm
Version
3.2.1
Version published
Weekly downloads
11M
5.68%
Maintainers
3
Weekly downloads
 
Created
Source

@vercel/oidc

Runtime OIDC helper methods intended to be used with your Vercel Functions

Usage

Getting an OIDC Token

import { getVercelOidcToken } from '@vercel/oidc';

// Get token using project.json configuration
const token = await getVercelOidcToken();

// Get token with explicit project and team (supports both IDs and slugs)
const token = await getVercelOidcToken({
  project: 'my-project', // or 'prj_abc123'
  team: 'my-team', // or 'team_xyz789'
});

// Get token with expiration buffer (refresh if expires within 5 minutes)
const token = await getVercelOidcToken({
  expirationBufferMs: 5 * 60 * 1000,
});

API

getVercelOidcToken(options?)

Gets the current OIDC token from the request context or environment variable. Will refresh the token if expired in development.

Options:

  • project?: string - Project ID (prj_*) or slug
  • team?: string - Team ID (team_*) or slug
  • expirationBufferMs?: number - Buffer time in ms before expiry to trigger refresh (default: 0)

getVercelOidcTokenSync()

Synchronously gets the current OIDC token without refreshing. Use getVercelOidcToken() if you need automatic refresh in development.

FAQs

Package last updated on 22 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts