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

Function oauthScope

packages/opencode/src/plugin/snowflake-cortex.ts:72–77  ·  view source on GitHub ↗
(role: string | undefined)

Source from the content-addressed store, hash-verified

70}
71
72export function oauthScope(role: string | undefined) {
73 if (!role) return "refresh_token"
74 return /^[-_A-Za-z0-9]+$/.test(role)
75 ? `refresh_token session:role:${role}`
76 : `refresh_token session:role-encoded:${encodeURIComponent(role)}`
77}
78
79function authHeaders() {
80 return {

Callers 2

buildAuthorizeUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected