(op: string, fn: (wos: WorkOS) => Promise<A>)
| 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* () { |
no test coverage detected