mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 10:58:38 +00:00
Base64 encode auth tokens (#1029)
* Base64 encode auth tokens to prevent issues in emails This fixes #1023, which should in turn solve some issues people were having with emails. * Make test bcrypt hash things as the auth token isn't one by default * Update ProjectLighthouse/Helpers/CryptoHelper.cs Co-authored-by: Josh <josh@slendy.pw> * Make only email tokens base64 encoded --------- Co-authored-by: Zaprit <zaprit@hugespaceship.io> Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
parent
98a7f95e65
commit
e060f55896
3 changed files with 10 additions and 5 deletions
|
@ -20,8 +20,8 @@ public class DatabaseTests : LighthouseServerTest<GameServerTestStartup>
|
|||
|
||||
int rand = new Random().Next();
|
||||
|
||||
UserEntity userA = await database.CreateUser("unitTestUser" + rand, CryptoHelper.GenerateAuthToken());
|
||||
UserEntity userB = await database.CreateUser("unitTestUser" + rand, CryptoHelper.GenerateAuthToken());
|
||||
UserEntity userA = await database.CreateUser("unitTestUser" + rand, CryptoHelper.BCryptHash(CryptoHelper.GenerateAuthToken()));
|
||||
UserEntity userB = await database.CreateUser("unitTestUser" + rand, CryptoHelper.BCryptHash(CryptoHelper.GenerateAuthToken()));
|
||||
|
||||
Assert.NotNull(userA);
|
||||
Assert.NotNull(userB);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue