Open geekz-reno opened 3 years ago
Just curious, why we must always call context.Items["Account"] = await dataContext.Accounts.FindAsync(accountId); on every request? i mean it always try calling to database on every call to protected route? can we use claims to achieve that?
Here's an example of embedding claims into the jwt: https://dotnetcoretutorials.com/2020/01/15/creating-and-validating-jwt-tokens-in-asp-net-core/
Just curious, why we must always call context.Items["Account"] = await dataContext.Accounts.FindAsync(accountId); on every request? i mean it always try calling to database on every call to protected route? can we use claims to achieve that?