()
| 478 | "Complete Snowflake sign-in in your browser. OpenCode will capture the OAuth callback and store the bearer token automatically.", |
| 479 | method: "auto" as const, |
| 480 | async callback() { |
| 481 | try { |
| 482 | const tokens = await callbackPromise |
| 483 | return { |
| 484 | type: "success" as const, |
| 485 | refresh: tokens.refresh_token!, |
| 486 | access: tokens.access_token, |
| 487 | expires: Date.now() + (tokens.expires_in ?? 600) * 1000, |
| 488 | accountId: account, |
| 489 | } |
| 490 | } catch { |
| 491 | return { type: "failed" as const } |
| 492 | } finally { |
| 493 | stopOAuthServer() |
| 494 | } |
| 495 | }, |
| 496 | } |
| 497 | }, |
| 498 | }, |
nothing calls this directly
no test coverage detected