Refactor repository methods to async and update credential logic

This commit is contained in:
Aaron Po
2026-01-22 11:14:23 -05:00
parent fd544dbd34
commit 82db763951
11 changed files with 84 additions and 67 deletions

View File

@@ -164,7 +164,13 @@ CREATE TABLE UserCredential -- delete credentials when user account is deleted
Hash NVARCHAR(MAX) NOT NULL,
-- uses argon2
Timer ROWVERSION,
IsRevoked BIT NOT NULL
CONSTRAINT DF_UserCredential_IsRevoked DEFAULT 0,
RevokedAt DATETIME NULL,
Timer ROWVERSION,
CONSTRAINT PK_UserCredential
PRIMARY KEY (UserCredentialID),
@@ -173,9 +179,6 @@ CREATE TABLE UserCredential -- delete credentials when user account is deleted
FOREIGN KEY (UserAccountID)
REFERENCES UserAccount(UserAccountID)
ON DELETE CASCADE,
CONSTRAINT AK_UserCredential_UserAccountID
UNIQUE (UserAccountID)
);
CREATE NONCLUSTERED INDEX IX_UserCredential_UserAccount