mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 15:09:39 +02:00
improve verify email redirect flow
This commit is contained in:
parent
6b4b989235
commit
5fb85130ec
18 changed files with 145 additions and 83 deletions
|
@ -13,11 +13,18 @@ export async function sendEmailVerificationCode(
|
|||
): Promise<void> {
|
||||
const code = await generateEmailVerificationCode(userId, email);
|
||||
|
||||
await sendEmail(VerifyEmail({ username: email, verificationCode: code }), {
|
||||
to: email,
|
||||
from: config.email?.no_reply,
|
||||
subject: "Verify your email address",
|
||||
});
|
||||
await sendEmail(
|
||||
VerifyEmail({
|
||||
username: email,
|
||||
verificationCode: code,
|
||||
verifyLink: `${config.app.base_url}/auth/verify-email`,
|
||||
}),
|
||||
{
|
||||
to: email,
|
||||
from: config.email?.no_reply,
|
||||
subject: "Verify your email address",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
async function generateEmailVerificationCode(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue