feat: add local signup and Kakao verification gate

This commit is contained in:
2026-07-26 10:17:16 +00:00
parent c364552960
commit a7bb352ba2
41 changed files with 2293 additions and 95 deletions
@@ -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'),
});