@vercel/oidc
Runtime OIDC helpers intended for use with Vercel Functions
Last updated 2 months ago by GitHub Actions .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @vercel/oidc 
SYNC missed versions from official npm registry.

@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.

Current Tags

  • 3.2.0                                ...           canary (10 months ago)
  • 4.0.9                                ...           latest (15 days ago)
  • 4.0.9-snapshot-9209a1e84cf9                                ...           snapshot (16 days ago)

55 Versions

  • 4.0.9                                ...           15 days ago
  • 4.0.9-snapshot-9209a1e84cf9                                ...           16 days ago
  • 4.0.8                                ...           18 days ago
  • 4.0.8-snapshot-e70db18f5218                                ...           20 days ago
  • 4.0.8-snapshot-58343189052f                                ...           20 days ago
  • 4.0.8-snapshot-ac4725c7d538                                ...           20 days ago
  • 4.0.7                                ...           21 days ago
  • 4.0.7-snapshot-d1023ee75c2c                                ...           21 days ago
  • 4.0.6                                ...           24 days ago
  • 4.0.6-snapshot-01b208a88025                                ...           24 days ago
  • 4.0.6-snapshot-c80a43d75dc7                                ...           24 days ago
  • 4.0.6-snapshot-b8e5bb846796                                ...           25 days ago
  • 4.0.5                                ...           a month ago
  • 4.0.5-snapshot-7c63e261c47b                                ...           a month ago
  • 4.0.5-snapshot-c4f338842961                                ...           a month ago
  • 4.0.5-snapshot-dd15927e8ded                                ...           a month ago
  • 4.0.4                                ...           a month ago
  • 4.0.3                                ...           a month ago
  • 4.0.2                                ...           a month ago
  • 4.0.1                                ...           a month ago
  • 4.0.0                                ...           2 months ago
  • 3.8.10                                ...           2 months ago
  • 3.8.9                                ...           2 months ago
  • 3.8.8                                ...           2 months ago
  • 3.8.7                                ...           3 months ago
  • 3.8.6                                ...           3 months ago
  • 3.8.5                                ...           3 months ago
  • 3.8.4                                ...           4 months ago
  • 3.8.3                                ...           4 months ago
  • 3.8.2                                ...           4 months ago
  • 3.8.1                                ...           4 months ago
  • 3.8.0                                ...           5 months ago
  • 3.7.1                                ...           5 months ago
  • 3.7.0                                ...           5 months ago
  • 3.6.2                                ...           5 months ago
  • 3.6.1                                ...           6 months ago
  • 3.6.0                                ...           6 months ago
  • 3.5.0                                ...           6 months ago
  • 3.4.1                                ...           7 months ago
  • 3.4.0                                ...           7 months ago
  • 3.3.1                                ...           7 months ago
  • 3.3.0                                ...           7 months ago
  • 3.2.1                                ...           7 months ago
  • 3.3.0-canary.20260211174907.cdd2da6                                ...           10 months ago
  • 3.2.0                                ...           10 months ago
  • 3.1.0                                ...           a year ago
  • 3.0.5                                ...           a year ago
  • 3.0.4                                ...           a year ago
  • 3.0.3                                ...           a year ago
  • 3.0.2                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
Downloads
Total 196
Today 0
This Week 1
This Month 138
Last Day 0
Last Week 51
Last Month 58
Dependencies (3)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE