MCPcopy Index your code
hub / github.com/simstudioai/sim / saveTokens

Function saveTokens

apps/sim/lib/mcp/oauth/storage.ts:179–185  ·  view source on GitHub ↗
(rowId: string, tokens: OAuthTokens)

Source from the content-addressed store, hash-verified

177}
178
179export async function saveTokens(rowId: string, tokens: OAuthTokens): Promise<void> {
180 const encrypted = await encryptTokens(tokens)
181 await db
182 .update(mcpServerOauth)
183 .set({ tokens: encrypted, lastRefreshedAt: new Date(), updatedAt: new Date() })
184 .where(eq(mcpServerOauth.id, rowId))
185}
186
187export async function saveCodeVerifier(rowId: string, verifier: string): Promise<void> {
188 const { encrypted } = await encryptSecret(verifier)

Callers

nothing calls this directly

Calls 3

encryptTokensFunction · 0.85
setMethod · 0.65
eqFunction · 0.50

Tested by

no test coverage detected