(search: string, cookie?: string)
| 98 | const target = yield* Target; |
| 99 | |
| 100 | const callback = (search: string, cookie?: string) => |
| 101 | Effect.promise(() => |
| 102 | fetch(new URL(`/api/auth/callback${search}`, target.baseUrl), { |
| 103 | redirect: "manual", |
| 104 | ...(cookie ? { headers: { cookie } } : {}), |
| 105 | }), |
| 106 | ); |
| 107 | |
| 108 | // A state that matches no login-state cookie (no login ever started). |
| 109 | const noCookie = yield* callback("?code=attacker-code&state=attacker-state"); |
no test coverage detected