public async Task <ActionResult <string> > Register([FromBody] RegisterDto model) { var user = new User(model.Email, _defaultUserRoles); await _userManager.CreateAsync(user, model.Password); var token = await _jwtHandler.GenerateJwtToken(user.Email, user.Name, user.EntityId.ToString(), user.Roles); return(Ok(token)); }