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

Function isJwtVerificationFailure

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

Source from the content-addressed store, hash-verified

128const isErrorWithCode = Schema.is(ErrorWithCode);
129
130const isJwtVerificationFailure = (cause: unknown): boolean =>
131 isErrorWithCode(cause) &&
132 (cause.code.startsWith("ERR_JWT_") ||
133 cause.code.startsWith("ERR_JWS_") ||
134 cause.code === JWKSNoMatchingKey.code);
135
136const isJwksSystemFailure = (cause: unknown): boolean =>
137 isErrorWithCode(cause) && (cause.code === JWKSTimeout.code || cause.code === JWKSInvalid.code);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected