MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isJwtVerificationFailure

Function isJwtVerificationFailure

apps/cloud/src/auth/workos.ts:152–156  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

150const isErrorWithCode = Schema.is(ErrorWithCode);
151
152const isJwtVerificationFailure = (cause: unknown): boolean =>
153 isErrorWithCode(cause) &&
154 (cause.code.startsWith("ERR_JWT_") ||
155 cause.code.startsWith("ERR_JWS_") ||
156 cause.code === JWKSNoMatchingKey.code);
157
158const isJwksSystemFailure = (cause: unknown): boolean =>
159 isErrorWithCode(cause) && (cause.code === JWKSTimeout.code || cause.code === JWKSInvalid.code);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected