(cookie?: string)
| 57 | const target = yield* Target; |
| 58 | |
| 59 | const signOut = (cookie?: string) => |
| 60 | Effect.promise(() => |
| 61 | fetch(new URL("/api/auth/logout", target.baseUrl), { |
| 62 | method: "POST", |
| 63 | redirect: "manual", |
| 64 | ...(cookie ? { headers: { cookie } } : {}), |
| 65 | }), |
| 66 | ); |
| 67 | |
| 68 | // A session cookie that no longer authenticates — expired, or revoked |
| 69 | // upstream while the tab sat open. There is nothing to end at WorkOS, but |
no test coverage detected