chore: encrypt and decrypt email addr

This commit is contained in:
Catalin Pit
2024-01-25 17:24:37 +02:00
parent 49ecfc1a2c
commit 311c8da8fc
3 changed files with 8 additions and 7 deletions

View File

@ -18,7 +18,7 @@ export default function UnverifiedAccount() {
const searchParams = useSearchParams();
const { toast } = useToast();
const token = searchParams?.get('t') ?? '';
const encryptedEmail = searchParams?.get('t') ?? ''; // TODO: choose a better name instead of t
const { mutateAsync: sendConfirmationEmail } = trpc.profile.sendConfirmationEmail.useMutation();
@ -26,9 +26,7 @@ export default function UnverifiedAccount() {
try {
setIsButtonDisabled(true);
// TODO: decrypt email and send it
await sendConfirmationEmail({ email: token ?? '' });
await sendConfirmationEmail({ email: encryptedEmail });
toast({
title: 'Success',