INNER CODE UNIT · TypeScript
keyIds
bex-co/beancount-io · backend-cluster/backend-v2/src/config/jwks/index.ts:191
const keyIds = keys.map((key) => key.kid);
if (new Set(keyIds).size !== keyIds.length) {
throw new Error("OAUTH_JWKS key ids must be unique");
}
return { keys };
}
/**
* OAuth is optional while legacy session authentication remains supported.
* Missing production signing keys disable OAuth without taking down the API.
*/
export function getOptionalJwks(
env: Environment,
serializedProductionJwks: string | undefined = process.env.OAUTH_JWKS,
derivation: JwksDerivation = derivationFromEnvironment(),
): OptionalSigningJwks {
try {