MCPcopy Index your code
hub / github.com/anomalyco/opencode / callback

Function callback

packages/opencode/src/plugin/snowflake-cortex.ts:480–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 },

Callers

nothing calls this directly

Calls 1

stopOAuthServerFunction · 0.70

Tested by

no test coverage detected