( result: R, )
| 31 | |
| 32 | /** Narrow a `start` result to the redirect arm, failing with what came back. */ |
| 33 | const redirected = <R extends { status: string }>( |
| 34 | result: R, |
| 35 | ): Extract<R, { status: "redirect" }> => { |
| 36 | if (result.status !== "redirect") { |
| 37 | throw new Error(`oauth.start did not redirect: ${JSON.stringify(result)}`); |
| 38 | } |
| 39 | return result as Extract<R, { status: "redirect" }>; |
| 40 | }; |
| 41 | |
| 42 | scenario( |
| 43 | "OAuth · probe discovers an authorization server's endpoints from its issuer URL", |
no outgoing calls
no test coverage detected