mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
Fix iphone captcha throws (#1495)
This commit is contained in:
parent
7f7b673b0a
commit
24a0396d0f
3 changed files with 4 additions and 2 deletions
|
@ -30,7 +30,7 @@ namespace Bit.App.Pages
|
||||||
captchaRequiredText = AppResources.CaptchaRequired,
|
captchaRequiredText = AppResources.CaptchaRequired,
|
||||||
});
|
});
|
||||||
|
|
||||||
var url = environmentService.WebVaultUrl + "/captcha-mobile-connector.html?" + "data=" + data +
|
var url = environmentService.GetWebVaultUrl() + "/captcha-mobile-connector.html?" + "data=" + data +
|
||||||
"&parent=" + Uri.EscapeDataString(callbackUri) + "&v=1";
|
"&parent=" + Uri.EscapeDataString(callbackUri) + "&v=1";
|
||||||
|
|
||||||
WebAuthenticatorResult authResult = null;
|
WebAuthenticatorResult authResult = null;
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace Bit.Core.Models.Response
|
||||||
{
|
{
|
||||||
var model = errorModel.ToObject<ErrorModel>();
|
var model = errorModel.ToObject<ErrorModel>();
|
||||||
Message = model.Message;
|
Message = model.Message;
|
||||||
ValidationErrors = model.ValidationErrors;
|
ValidationErrors = model.ValidationErrors ?? new Dictionary<string, List<string>>();
|
||||||
CaptchaSiteKey = ValidationErrors.ContainsKey("HCaptcha_SiteKey") ?
|
CaptchaSiteKey = ValidationErrors.ContainsKey("HCaptcha_SiteKey") ?
|
||||||
ValidationErrors["HCaptcha_SiteKey"]?.FirstOrDefault() :
|
ValidationErrors["HCaptcha_SiteKey"]?.FirstOrDefault() :
|
||||||
null;
|
null;
|
||||||
|
|
|
@ -106,7 +106,9 @@ namespace Bit.iOS.Core.Services
|
||||||
if (_progressAlert == null)
|
if (_progressAlert == null)
|
||||||
{
|
{
|
||||||
result.TrySetResult(0);
|
result.TrySetResult(0);
|
||||||
|
return result.Task;
|
||||||
}
|
}
|
||||||
|
|
||||||
_progressAlert.DismissViewController(false, () => result.TrySetResult(0));
|
_progressAlert.DismissViewController(false, () => result.TrySetResult(0));
|
||||||
_progressAlert.Dispose();
|
_progressAlert.Dispose();
|
||||||
_progressAlert = null;
|
_progressAlert = null;
|
||||||
|
|
Loading…
Reference in a new issue