( authorizationUrl: string, )
| 180 | * consent app, Google folds those unrelated scopes into the new consent flow and |
| 181 | * can fail inside accounts.google.com before returning to our callback. */ |
| 182 | export const providerAuthorizeExtras = ( |
| 183 | authorizationUrl: string, |
| 184 | ): Readonly<Record<string, string>> => { |
| 185 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: URL() throws on invalid input → no provider extras |
| 186 | try { |
| 187 | const host = new URL(authorizationUrl).host.toLowerCase(); |
| 188 | if (host === "accounts.google.com") { |
| 189 | return { access_type: "offline", prompt: "consent" }; |
| 190 | } |
| 191 | } catch { |
| 192 | // Unparseable authorization URL — let buildAuthorizationUrl surface the error. |
| 193 | } |
| 194 | return {}; |
| 195 | }; |
| 196 | |
| 197 | // --------------------------------------------------------------------------- |
| 198 | // Regional token-endpoint rebind |
no outgoing calls
no test coverage detected