1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00
Commit Graph

700 Commits

Author SHA1 Message Date
Federico Maccaroni
aaa45b18a4
PM-7553 Fix native apps passkeys autofill and creation 2024-04-24 14:09:16 -03:00
Federico Maccaroni
1bfe894181
PM-7623 Fix proper implementation of IFido2GetAssertionUserInterface now that the Fido2ClientService is being used for passkey autofill (#3174) 2024-04-22 13:36:18 -03:00
Federico Maccaroni
bfa57ad888
PM-7585 Show error message when Origin is null, given no support for passkeys from native apps yet (#3175) 2024-04-19 17:41:35 -03:00
Federico Maccaroni
96a7d5e089
[PM-7365] Fix UV not being performed on Fido2 credential creation Android (#3171)
* PM-7365 Fix UV not being performed on Fido2 credential creation on Android

* PM-7365 Fix PublicKeyCredentialCreationOptions mapping from json on AuthenticatorSelection so mainly userVerification has correct value
2024-04-19 12:42:46 -03:00
Andreas Coroiu
c1522e249d
[PM-7257] android add support for web authn resident key credential property in our net mobile app 2 (#3170)
* [PM-7257] feat: add ability to override `clientDataHash`

* [PM-7257] feat: add support for clientDataHash and extensions

* PM-7257 Updated the origin to be the correct one and not the android one to be passed to the Fido2Client

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
2024-04-19 10:52:19 -03:00
Federico Maccaroni
76e0f7e1a4
Merge branch 'main' into feature/maui-migration-passkeys
# Conflicts:
#	src/Core/Abstractions/ICipherService.cs
#	src/Core/Abstractions/IStateService.cs
#	src/Core/Models/AppOptions.cs
#	src/Core/Resources/Localization/AppResources.resx
#	src/Core/Utilities/ServiceContainer.cs
#	src/iOS.Autofill/iOS.Autofill.csproj
2024-04-18 13:28:22 -03:00
Federico Maccaroni
c88287ec64
PM-7258 Updated Android Credential creation details on description to be localized and passed the user email for further details. (#3162) 2024-04-17 19:10:53 -03:00
Federico Maccaroni
350a22d20e
PM-5154 Avoid logging Fido2AuthenticatorExceptions (#3169) 2024-04-17 17:42:36 -03:00
Federico Maccaroni
4eb608ec11
PM-7385 Fix IFido2MakeCredentialConfirmationUserInterface resolve and usage to be constrained to Android. (#3164) 2024-04-17 09:05:46 -03:00
Dinis Vieira
5a4a54f4af
[PM-7385] Fix for allowing switching accounts while creating a passkey of Android (#3155)
* PM-7385 Fixed for allowing switching accounts while creating a passkey on Android.
This fixes also include scenarios where we need to unlock the vault after switching
Also fixed the issue where tapping on cipher won't do anything after switching.

* PM-7385 ensure the Options.Fido2CredentialAction and FromFido2Framework are reset when the Credential flow is started to avoid erratic behaviors when switching accounts, app is in background or other edge case scenarios.
These properties where replaced by calls to _fido2MakeCredentialConfirmationUserInterface.IsConfirmingNewCredential instead.

* Minor changes and added comments

* [PM-7385] Implemented several changes suggested in PR for better/cleaner code.

* PM-7385 Added several minor code improvemments.
2024-04-16 21:52:52 +01:00
Federico Maccaroni
f596f31ffa
[PM-7366] Select cipher on search on Fido2 creation (#3154)
* PM-7366 Implemented cipher selection on search on passkey creation

* PM-7366 Fix typo
2024-04-15 17:16:51 -03:00
Federico Maccaroni
40f036742f
PM-7367 Fix empty items state placeholder on Android cipher selection page (#3160) 2024-04-15 17:13:41 -03:00
Federico Maccaroni
4b7f8074f3
PM-7365 Fix setting HasUnlockedInThisTransaction on passkey creation on android (#3153) 2024-04-15 17:13:26 -03:00
Álison Fernandes
fa5d92fbf7
[PM-7407] Updates the self-host release date in the unassigned items alert message (#3158) 2024-04-15 15:58:56 +02:00
github-actions[bot]
e672cb132f
Autosync the updated translations (#3151)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-12 19:51:04 +00:00
Federico Maccaroni
e7a7eed7e8
[PM-7407] Implemented check for organizations with unassigned items (#3150) 2024-04-12 15:52:39 -03:00
Dinis Vieira
08f371b0db
[PM-7369] Show passkey icon on android when the item has a Fido2 credential (#3148)
* PM-7369 Show passkey icon on android when the item has a Fido2 credential

* PM-7369 alternative way to show passkey icon only in scenarios where we are trying to create a passkey

* PM-7369 moved logic to show passkey icon to CipherItemViewModel

* Update src/Core/Utilities/IconGlyphConverter.cs

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
2024-04-11 13:14:45 +01:00
Álison Fernandes
ab5e72ef83
Merge branch 'main' into feature/maui-migration-passkeys 2024-04-09 21:59:31 +01:00
Dinis Vieira
ca944025d7
[PM-5153] Android Passkey Implementation (#3020)
* Initial WIP implementation for the app unlock flow when called from Passkey. Still needs code organization and to be finished.
Also added a new Window workaround in App.xaml.cs to allow CredentialProviderSelectionActivity to launch separately.

* Added missing IDeviceActionService.cs implementation for iOS to build.

* Added Async to ReturnToPasskeyAfterUnlockMethod
Changed i18n to AppResource.Unlock
Removed unecessary cast

* minor code change (added comment)

* Added back the case for loading a specific Window for CredentialProviverSelectionActivity

* Added fix for Intent not passing properly to CredentialProviderSelectionActivity
Added Activity cancellation on error during execution of ReturnToPasskeyAfterUnlockAsync()

* Added WIP code for Android passkey implementation. Currently returns a mostly complete response that is missing the ClientDataJson

* Added WIP code for creating passkeys on Android. Still missing unlock flow and response of passkey creation is still not correct.
Removed unused throw NotImplementedException from Fido2ClientService
Added CredentialCreationActivity for passkey creation
Added alternative code on CredentialProviderSelectionActivity to try to debug issue with response not being valid

* Started working on logic to adding unlock flow. It's already handling the unlock but not passing the PendingIntentHandler info for CredentialCreation to CredentialCreationActivity

* Changed "cross-platform" to "platform"

* Created CredentialHelpers.cs class to share code used for Populating Passkeys in Android.

* Added Passkey Credential Creation shared code to CredentialHelpers.
Unlock flow for Passkey creation should now be working also.

* Updated code for checking if the CredentialProviderService has been enabled by the user or not. Still WIP, somes notes in code due to Credential API not being complete.
Also changed the disable code to open the Credential Settings.

* Replaced the AndroidX.Credential helpers with custom JSON creation to fix the response for Credential Creation

* minor code cleanup on CredentialProviderSelectionActivity

* added todo comment

* Feature/maui migraton passkeys android unlock fix andreas (#3077)

* fix: bitwarden providing too many/wrong credentials

* feat: use authenticator instead of client

---------

Co-authored-by: Dinis Vieira <dinisvieira@outlook.com>

* Removed / commented some older Passkey Proof of concept code.
Auth and creation of passkey should still work both when device is unlocked (and not)
Added some initial code in AutofillCiphersPageViewModel and CipherAddEditPageViewModel for handling Passkey creation

* PM-6829 Implemented Fido2...UserInterfaces on Android and necessary logic to get/make a credential with those

* Added IFido2MediatorService registrations
Inverted two IsLockedAsync checks

* Added navigation to autofillCipher when creating passkey

* Updated LockPage to avoid multiple executions of SubmitAsync

* Added new flow for creating new passkey on Android with the Cipher page for editing details

* Changed the Credential Provider Switch to an external link control

* Added i18n for Passkey Settings

* Cleanup of older Credentials code used for Android Fido2 POC.
Removed CredentialCreationActivity as it's no longer needed

* fixed merge conflict/error and added error check to Fido2 navigation in App.xaml.cs

* Removed from MainActivity casts from DeviceActionService
Changed CredentialProviderServiceActivity to handle Fido errors and exceptions gracefully and show the user an error. Still not with the correct messages.

* Added some error messages. Still need to confirm the Text Resource to use and change.

* Changed some messages to use AppResources

* Cleanup of Credential Android code and added exception result if the clientCreateCredentialResult is null

* Updated Add new item button text when creating a new passkey

* Added AccountSwitchedException for the Fido Mediator Service

* Removed TODO that is no longer needed

* Updated some todo messages in Android AutofillHandler

* When authenticating a passkey on Android the "showDialog" callback can be called and there's no MainPage available so it was changed for that specific scenario to use _deviceActionService instead of MainPage.

---------

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
2024-04-09 21:57:31 +01:00
github-actions[bot]
58442389df
Autosync the updated translations (#3122)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-08 06:02:32 +00:00
Andreas Coroiu
ceca142c65
feat: add support for credProps.rk extension (#3132) 2024-04-03 16:52:39 +01:00
Federico Maccaroni
4633fea41e
PM-6209 Removed MAUI label from environment and about pages (#2990) 2024-03-29 20:54:41 +00:00
Federico Maccaroni
8fd9e0203d
PM-6798 Fix account switch on iOS Autofill extension and also changed to Try... actions for TaskCompletionSource to avoid exceptions on some occasions. (#3121)
Co-authored-by: Álison Fernandes <vvolkgang@users.noreply.github.com>
2024-03-27 22:11:26 +00:00
Federico Maccaroni
310d8b363f
[PM-6655] Add null fallback cipher name on passkeys (#3116)
* PM-6655 Fixed fallback value on passkeys to take into account CipherView.Name. Also removed non-discoverable passkey filter on adding credentials to the ASStore and also added the fallback consideration on the passkeys list iOS extension

* PM-6655 Restored non-discoverable filter on credentials set for ASStore on this PR
2024-03-27 22:02:28 +00:00
Federico Maccaroni
45641aadfe
[PM-6798] Fix account switch on autofill (#3106)
* PM-6798 Force state update when opening the Autofill extension

* PM-6798 Fix InitAppIfNeededAsync to be awaited and also ignored Fido2AuthenticatorException from logging them to AppCenter since they don't add much information and we're logging in other places what we need
2024-03-25 12:17:40 -03:00
Federico Maccaroni
1fd7dd462e
Merge branch 'main' into feature/maui-migration-passkeys 2024-03-22 15:42:51 -03:00
github-actions[bot]
64775694e0
Autosync the updated translations (#3105)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-22 16:07:23 +00:00
Dinis Vieira
3c0007a21a
[PM-7009] Improved exception messages for the Broadcast Service message callback function (#3091)
* Improved exception messages for the Broadcast Service message callback function

* Update src/Core/App.xaml.cs

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Additional Null Check

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Additional Null Check

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Additional Null Check

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Additional Null Check

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

* Update src/Core/App.xaml.cs

Additional Null Check

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
2024-03-22 12:29:12 -03:00
Federico Maccaroni
ff49d041be
[PM-6655] Add username empty fallback on passkey (#3101)
* PM-6655 Added fallback "Unknown account" to passkey username and moved it so it can be shared with Android

* PM-6655 Improved code lines formatting
2024-03-21 13:56:37 -03:00
Federico Maccaroni
b931263662
PM-6793 Updated autofill settings copy (#3102) 2024-03-21 13:28:54 -03:00
Federico Maccaroni
3a10e09469
PM-6706 Fixed UV attempts to be maximum 5 attempts and not 6 (#3103) 2024-03-21 13:28:38 -03:00
Federico Maccaroni
ebc068d820
[PM-6848] Improved User verification on passkeys creation (#3099)
* PM-6848 Updated cancellation flow on passkey user verification and improved UV enforcement on creation

* PM-6848 Added null checks to help diagnosing if NRE is presented
2024-03-21 13:28:14 -03:00
Federico Maccaroni
6bec0ede05
Merge branch 'main' into feature/maui-migration-passkeys 2024-03-20 09:02:57 -03:00
github-actions[bot]
3b64d7b979
Autosync the updated translations (#3083)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-15 23:31:54 +00:00
Federico Maccaroni
39da2a82c6
PM-6706 Add maximum attempts to UV with MP and with PIN (#3079) 2024-03-14 18:22:38 -03:00
Federico Maccaroni
970d3c2621
PM-6468 Implemented copy TOTP if needed after using a Fido2 credential. Also added the Fido2MediatorService to have one point to interact with the authentication and also to add any new logic we need. (#3082) 2024-03-14 18:12:50 -03:00
Federico Maccaroni
74085689d3
PM-6685 Fix race condition issue where the biometrics check is being done before the iOS extension is being shown. So when we need the UI, we wait until ViewDidAppear happens. (#3078) 2024-03-14 18:07:52 -03:00
Federico Maccaroni
144fc7c727
[PM-5154] Implement combined view for passwords and passkeys on iOS Autofill extension (#3075)
* PM-5154 Implemented combined view of passwords and passkeys and improved search and items UI

* PM-5154 Code improvement from PR feedback

* PM-5154 Code improvement to log unknown exceptions
2024-03-13 12:06:08 -03:00
Federico Maccaroni
dd997aaa47
Merge branch 'main' into feature/maui-migration-passkeys 2024-03-12 12:38:52 -03:00
github-actions[bot]
a8529fa4b7
Autosync the updated translations (#3064)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-03-12 08:41:52 +00:00
Federico Maccaroni
4292542155
[PM-6466] Implement passkeys User Verification (#3044)
* PM-6441 Implement passkeys User Verification

* PM-6441 Reorganized UserVerificationMediatorService so everything is not in the same file

* PM-6441 Fix Unit tests

* PM-6441 Refactor UserVerification on Fido2Authenticator and Client services to be of an enum type so we can see which specific preference the RP sent and to be passed into the user verification mediator service to perform the correct flow depending on that. Also updated Unit tests.

* PM-6441 Changed user verification logic a bit so if preference is Preferred and the app has the ability to verify the user then enforce required UV and fix issue on on Discouraged to take into account MP reprompt
2024-03-06 12:32:39 -03:00
Andreas Coroiu
4c2932f4d0
Fix FIDO2 client bugs (#3056)
* fix: blockedUris null issue

* fix: trailing slash in origin breaking check
2024-03-06 10:58:48 +00:00
Federico Maccaroni
a10481603d
Merge branch 'main' into feature/maui-migration-passkeys
# Conflicts:
#	src/iOS.Core/Controllers/LoginAddViewController.cs
2024-03-05 18:23:23 -03:00
Federico Maccaroni
19f238d9bb
[PM-6539] Fix Autofill Extension TDE without MP flow (#3049)
* PM-6539 Fix Autofill Extension TDE without MP updating PromptSSO to work in MAUI and also Generator view. WebAuthenticator copied with UIWindow gotten as it was in Xamarin forms to work. Also fix one NRE on state migration.

* PM-6539 Remove unnecessary using
2024-03-05 18:09:20 -03:00
Federico Maccaroni
b8ff0e0244
Merge branch 'main' into feature/maui-migration-passkeys 2024-03-04 11:03:30 -03:00
Dinis Vieira
dd3dc82595
PM-6552 Added missing using (#3052) 2024-03-04 13:29:22 +00:00
Dinis Vieira
40c80f082d
[PM-6552] Fix for Android Window issues when opening Autofill/Accessibility (#3051)
* PM-6552 Removed several of the Window Workarounds for Android. Now always relying on the AndroidNavigationRedirectPage.
AndroidNavigationRedirectPage now more resilient to failure and navigates to HomePage as fallback.

* Update src/Core/Pages/AndroidNavigationRedirectPage.xaml.cs

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
2024-03-04 13:03:09 +00:00
Federico Maccaroni
85755902e1
Merge branch 'main' into feature/maui-migration-passkeys 2024-03-01 17:15:22 -03:00
André Bispo
bca5b95446
[PM-4760] Admin Recovery Permissions prompted to set MP. (#2912)
* [PM-4760] Add force password reset check on sync complete.

* [PM-4760] Log error on exception
2024-03-01 19:43:18 +00:00
Dinis Vieira
602627b5fa
PM-6552 Fix for App only showing Home (Login) Page after closed after opening Accessibility Settings (#3047) 2024-03-01 19:17:45 +00:00