Creates a context provider that requires Bearer token authentication.
// With custom token validationexport const handler = onCallGenkit( { contextProvider: requireBearerToken(async (token) => { const user = await verifyJWT(token); return { auth: { user } }; }) }, myFlow); Copy
// With custom token validationexport const handler = onCallGenkit( { contextProvider: requireBearerToken(async (token) => { const user = await verifyJWT(token); return { auth: { user } }; }) }, myFlow);
Creates a context provider that requires Bearer token authentication.