feat(auth) : add optional email verification and profile setup
CI / Verify (push) Failing after 57s
CI / Build immutable images and deploy (push) Skipped

This commit is contained in:
2026-10-08 18:46:04 +07:00 Unverified
parent 01f44688fb
commit da5de3fa8c
8 changed files with 111 additions and 16 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export function RegistrationOtpForm({ email, nextPath, setup }: {
try {
const result = await authClient.emailOtp.verifyEmail({ email: address, otp });
if (result.error) throw new Error("รหัสไม่ถูกต้องหรือหมดอายุ กรุณาลองอีกครั้ง");
const returnPath = setup ? `/profile?setup=1&next=${encodeURIComponent(nextPath)}` : nextPath;
const returnPath = setup ? `/auth/register?step=profile&next=${encodeURIComponent(nextPath)}` : nextPath;
router.replace(returnPath);
router.refresh();
} catch (cause) {