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

Function useMfa

apps/cloud/src/auth/workos.ts:436–443  ·  view source on GitHub ↗
(op: string, fn: (wos: WorkOS) => Promise<A>)

Source from the content-addressed store, hash-verified

434 // MFA SDK errors can contain response details. Keep only the status before
435 // logging, so enrollment secrets and submitted codes cannot enter a cause.
436 const useMfa = <A>(op: string, fn: (wos: WorkOS) => Promise<A>) =>
437 tryPromiseService(() => fn(workos)).pipe(
438 Effect.mapError(workosErrorFromFailure),
439 Effect.tapError((error) =>
440 Effect.logWarning(`workos.${op} failed`, { status: error.status }),
441 ),
442 Effect.withSpan(`workos.${op}`),
443 );
444
445 const authenticateSealedSession = (sessionData: string) =>
446 Effect.gen(function* () {

Callers 1

workos.tsFile · 0.85

Calls 1

tryPromiseServiceFunction · 0.90

Tested by

no test coverage detected