Invalidate JWTs on profile changes

This commit is contained in:
Holden
2026-06-28 12:46:12 -05:00
parent fefa01cf3f
commit e194bbf9c4
15 changed files with 395 additions and 47 deletions
@@ -53,6 +53,15 @@ public class ProfileRepository(DatabaseContext dbContext) : IProfileRepository
x.PlatformId == platformId,
ct);
public Task<Guid> GetProfileTokenVersion(
Guid profileId,
CancellationToken ct = default)
=> dbContext.Profiles
.AsNoTracking()
.Where(x => x.ProfileId == profileId)
.Select(x => x.TokenVersion)
.FirstOrDefaultAsync(ct);
public async Task AddAsync(
Profile profile,
CancellationToken ct = default)