()
| 67 | } |
| 68 | |
| 69 | export 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 | |
| 79 | export function verifySignature(data: string, signature: string, publicKeyPath: string): boolean { |
| 80 | try { |
no test coverage detected