(request: Request)
| 55 | // the shell's `isUnauthenticatedOAuthCallbackPath` exemption (cloud/self-host |
| 56 | // instead authenticate the callback via the same-origin session cookie). |
| 57 | const isUnauthenticatedCallback = (request: Request): boolean => { |
| 58 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: parsing a request URL that should always be valid here |
| 59 | try { |
| 60 | return /\/oauth\/callback(\/|$)/.test(new URL(request.url).pathname); |
| 61 | } catch { |
| 62 | return false; |
| 63 | } |
| 64 | }; |
| 65 | |
| 66 | /** |
| 67 | * Build the local `IdentityProvider`: validate the request's bearer token |
no outgoing calls
no test coverage detected