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

Function authTokenFromCredentials

packages/app/src/utils/server.ts:5–7  ·  view source on GitHub ↗
(input: { username?: string; password: string })

Source from the content-addressed store, hash-verified

3import { decode64 } from "@/utils/base64"
4
5export function authTokenFromCredentials(input: { username?: string; password: string }) {
6 return btoa(`${input.username ?? "opencode"}:${input.password}`)
7}
8
9export function authFromToken(token: string | null) {
10 const decoded = decode64(token ?? undefined)

Callers 3

terminalWebSocketURLFunction · 0.90
server.test.tsFile · 0.90
createSdkForServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected