( authorizationUrl: string, )
| 249 | * consent app, Google folds those unrelated scopes into the new consent flow and |
| 250 | * can fail inside accounts.google.com before returning to our callback. */ |
| 251 | export const providerAuthorizeExtras = ( |
| 252 | authorizationUrl: string, |
| 253 | ): Readonly<Record<string, string>> => { |
| 254 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: URL() throws on invalid input → no provider extras |
| 255 | try { |
| 256 | const host = new URL(authorizationUrl).host.toLowerCase(); |
| 257 | if (host === "accounts.google.com") { |
| 258 | return { access_type: "offline", prompt: "consent" }; |
| 259 | } |
| 260 | } catch { |
| 261 | // Unparseable authorization URL — let buildAuthorizationUrl surface the error. |
| 262 | } |
| 263 | return {}; |
| 264 | }; |
| 265 | |
| 266 | // --------------------------------------------------------------------------- |
| 267 | // Regional token-endpoint rebind |
no outgoing calls
no test coverage detected