feat: forgot password/reset password
This commit is contained in:
parent
26b32b40e2
commit
9d33093339
17 changed files with 374 additions and 25 deletions
|
@ -131,7 +131,12 @@ public static class AuthUtils
|
|||
}
|
||||
|
||||
public static string RandomToken(int bytes = 48) =>
|
||||
Convert.ToBase64String(RandomNumberGenerator.GetBytes(bytes)).Trim('=');
|
||||
Convert
|
||||
.ToBase64String(RandomNumberGenerator.GetBytes(bytes))
|
||||
.Trim('=')
|
||||
// Make the token URL-safe
|
||||
.Replace('+', '-')
|
||||
.Replace('/', '_');
|
||||
|
||||
public const int MaxAuthMethodsPerType = 3; // Maximum of 3 Discord accounts, 3 emails, etc
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue