mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-05 10:12:27 +00:00
parent
a8410fe352
commit
4ba75f09a9
16 changed files with 188 additions and 10 deletions
|
@ -49,15 +49,18 @@ public class SetEmailForm : BaseLayout
|
|||
UserId = user.UserId,
|
||||
User = user,
|
||||
EmailToken = CryptoHelper.GenerateAuthToken(),
|
||||
ExpiresAt = DateTime.Now + TimeSpan.FromHours(6),
|
||||
};
|
||||
|
||||
this.Database.EmailVerificationTokens.Add(emailVerifyToken);
|
||||
|
||||
// The user just set their email address. Now, let's grant them a token to proceed with verifying the email.
|
||||
// TODO: insecure
|
||||
WebToken webToken = new()
|
||||
{
|
||||
UserId = user.UserId,
|
||||
UserToken = CryptoHelper.GenerateAuthToken(),
|
||||
ExpiresAt = DateTime.Now + TimeSpan.FromDays(7),
|
||||
};
|
||||
|
||||
this.Response.Cookies.Append
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue