MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / generateOAuthRefreshToken

Function generateOAuthRefreshToken

packages/shared/src/crypto.ts:69–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69export function generateOAuthRefreshToken(): { token: string; hash: string } {
70 const secret = crypto.randomBytes(32).toString('hex');
71 const hash = hashSecret(secret);
72
73 return {
74 token: `${OAUTH_REFRESH_TOKEN_PREFIX}${secret}`,
75 hash,
76 };
77}
78
79export function verifySignature(data: string, signature: string, publicKeyPath: string): boolean {
80 try {

Callers 2

verifyAndExchangeCodeFunction · 0.90

Calls 1

hashSecretFunction · 0.85

Tested by

no test coverage detected