public async Task <ActionResult <AuthorizationResponse> > SetAuthorizationCode(string phoneNumber, string code) { var person = await _authorizationLogic.GetPerson(phoneNumber); var validationResult = _authorizationValidation.ValidateSetCode(person, code); if (!validationResult.ValidationResult) { return(BadRequest(validationResult.ValidationMessage)); } await _personLogic.CreatePerson(person.PersonUid); var tokens = _authorizationLogic.GetTokens(); await _authorizationLogic.UpdatePerson(phoneNumber, tokens.AccessToken, tokens.RefreshToken); return(new AuthorizationResponse { AccessToken = tokens.AccessToken, RefreshToken = tokens.RefreshToken }); }