feat: add local signup and Kakao verification gate

This commit is contained in:
Hide_D committed 2026-07-26 10:17:16 +00:00
1 parent c364552960
commit a7bb352ba2
41 files changed
+2293 -95

No files matched your search

@@ -0,0 +1,19 @@
import { constants, publicEncrypt } from 'node:crypto';
export interface GatewayPasswordPublicKey {
keyId: string;
algorithm: 'RSA-OAEP-256';
publicKeyPem: string;
}
export const sealGatewayPassword = (password: string, key: GatewayPasswordPublicKey) => ({
keyId: key.keyId,
ciphertext: publicEncrypt(
{
key: key.publicKeyPem,
padding: constants.RSA_PKCS1_OAEP_PADDING,
oaepHash: 'sha256',
},
Buffer.from(password, 'utf8')
).toString('base64'),
});