(search: string, cookie?: string)
| 74 | const target = yield* Target; |
| 75 | |
| 76 | const callback = (search: string, cookie?: string) => |
| 77 | Effect.promise(() => |
| 78 | fetch(new URL(`/api/auth/callback${search}`, target.baseUrl), { |
| 79 | redirect: "manual", |
| 80 | ...(cookie ? { headers: { cookie } } : {}), |
| 81 | }), |
| 82 | ); |
| 83 | |
| 84 | // A state that matches no login-state cookie (no login ever started). |
| 85 | const noCookie = yield* callback("?code=attacker-code&state=attacker-state"); |
no test coverage detected