private async Task <LoginResponse> GetLoginResponseAsync(User user) { var userRoles = await userManager.GetRolesAsync(user); return(new LoginResponse { User = mapper.Map <UserView>(user), AccessToken = jwtManager.GenerateAccessToken(user.Id, userRoles), RefreshToken = await jwtManager.SaveAndGetRefreshTokenAsync(user) }); }