Skip to content
Discussion options

You must be logged in to vote

Not with an openid-client v6 function. v6 only validates ID tokens as part of a flow (authorizationCodeGrant, refreshTokenGrant, implicitAuthentication, and so on), and none of its exports takes a bare ID token (src/index.ts).

The remote-keystore part is what jose does, and openid-client already depends on it (package.json#L91-L94). Since you import it directly, add it to your own dependencies too (npm i jose). Get the issuer and jwks_uri from discovery, then verify:

import * as client from 'openid-client'
import { createRemoteJWKSet, jwtVerify } from 'jose'

const config = await client.discovery(new URL(issuerUrl), clientId)
const { issuer, jwks_uri } = config.serverMetadata()

const JWKS =

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Lordfirespeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants