public async Task <IActionResult> Refresh([FromBody] UserRefreshTokenReqObj request) { var authResponse = await _identityService.RefreshTokenAsync(request.RefreshToken, request.Token); if (!authResponse.Success) { return(BadRequest(new AuthFailedResponse { Errors = authResponse.Errors })); } return(Ok(new AuthSuccessResponse { Token = authResponse.Token, RefreshToken = authResponse.RefreshToken })); }
public async Task <IActionResult> Refresh([FromBody] UserRefreshTokenReqObj request) { var authResponse = await _identityService.RefreshTokenAsync(request.RefreshToken, request.Token); //if (!authResponse.Success) //{ // return BadRequest(new AuthFailedResponse // { // Status = authResponse.Status, // }); //} return(Ok(new AuthSuccessResponse { Token = authResponse.Token, RefreshToken = authResponse.RefreshToken })); }