feat: resolve role-based authorization by extracting Roles claim from JWT and storing in state provider

This commit is contained in:
2026-05-10 20:24:59 +02:00
parent 5f39f2e063
commit 0c3fccc91e
6 changed files with 55 additions and 12 deletions
@@ -48,6 +48,7 @@ public class ServerIdentityService : IIdentityService
await _storageService.SaveSecureString(StorageKeys.RefreshToken, "");
await _storageService.SaveSecureString(StorageKeys.UserEmail, "");
await _storageService.SaveSecureString(StorageKeys.UserTenant, "");
await _storageService.SaveSecureString(StorageKeys.UserRoles, "");
}
catch
{
@@ -88,7 +89,8 @@ public class ServerIdentityService : IIdentityService
dto.TenantId,
dto.Plan,
dto.AverageQuizScore,
dto.LastReadBook
dto.LastReadBook,
dto.Roles
);
return Result.Ok(profile);