mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 07:43:37 +00:00
FIDO2 WebAuthn support for mobile (#1519)
* FIDO2 / WebAuthn support for mobile * fixes
This commit is contained in:
@@ -88,7 +88,8 @@ namespace Bit.iOS.Core.Services
|
||||
|
||||
var loadingIndicator = new UIActivityIndicatorView(new CGRect(10, 5, 50, 50));
|
||||
loadingIndicator.HidesWhenStopped = true;
|
||||
loadingIndicator.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray;
|
||||
loadingIndicator.ActivityIndicatorViewStyle = ThemeHelpers.LightTheme ? UIActivityIndicatorViewStyle.Gray :
|
||||
UIActivityIndicatorViewStyle.White;
|
||||
loadingIndicator.StartAnimating();
|
||||
|
||||
_progressAlert = UIAlertController.Create(null, text, UIAlertControllerStyle.Alert);
|
||||
@@ -446,6 +447,27 @@ namespace Bit.iOS.Core.Services
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool SupportsFido2()
|
||||
{
|
||||
// FIDO2 WebAuthn supported on 13.3+
|
||||
var versionParts = UIDevice.CurrentDevice.SystemVersion.Split('.');
|
||||
if (versionParts.Length > 0 && int.TryParse(versionParts[0], out var version))
|
||||
{
|
||||
if (version == 13)
|
||||
{
|
||||
if (versionParts.Length > 1 && int.TryParse(versionParts[1], out var minorVersion))
|
||||
{
|
||||
return minorVersion >= 3;
|
||||
}
|
||||
}
|
||||
else if (version > 13)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ImagePicker_FinishedPickingMedia(object sender, UIImagePickerMediaPickedEventArgs e)
|
||||
{
|
||||
if (sender is UIImagePickerController picker)
|
||||
|
||||
Reference in New Issue
Block a user