mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
async Task<string> GenerateJwtTokenAsync(User user)
This commit is contained in:
@@ -19,12 +19,12 @@ public class JwtService : IJwtService
|
||||
_invitesService = invitesService;
|
||||
}
|
||||
|
||||
public string GenerateJwtToken(User user)
|
||||
public async Task<string> GenerateJwtTokenAsync(User user)
|
||||
{
|
||||
var claims = new[]
|
||||
{
|
||||
new Claim("userId", user.Id.ToString()),
|
||||
new Claim(ClaimTypes.Role, _invitesService.GetRoleAsync(user).Result, ClaimValueTypes.String)
|
||||
new Claim(ClaimTypes.Role, await _invitesService.GetRoleAsync(user), ClaimValueTypes.String)
|
||||
};
|
||||
|
||||
var singing = new SigningCredentials(
|
||||
|
||||
Reference in New Issue
Block a user