[PR #2281] [MERGED] [SG-834] Mobile pending login requests management screen #3480

Closed
opened 2025-11-26 23:33:21 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2281
Author: @andrebispo5
Created: 1/6/2023
Status: Merged
Merged: 2/1/2023
Merged by: @andrebispo5

Base: masterHead: beeep/login-requests-manager


📝 Commits (10+)

  • 9164d79 Bootstrap new classes for settings list
  • 2097784 [SG-834] Add new method GetActivePasswordlessLoginRequestsAsync to AuthService
  • e18013c [SG-834] Add generic handle exception method to BaseViewModel
  • 8570a59 [SG-834] Add request verification to settings entry
  • e62f9ba [SG-834] Add text resources
  • a17e787 [SG-834] Update view and viewmodel
  • cf2acac Merge branch 'master' into beeep/login-requests-manager
  • c07a207 Merge branch 'master' into beeep/login-requests-manager
  • f912950 [SG-834] Remove unnecessary property assignment
  • 7f165af [SG-834] PR Fixes

📊 Changes

10 files changed (+395 additions, -5 deletions)

View changed files

📝 src/App/Controls/ExtendedCollectionView.cs (+12 -1)
📝 src/App/Pages/Accounts/LoginPasswordlessViewModel.cs (+1 -1)
src/App/Pages/Settings/LoginPasswordlessRequestsListPage.xaml (+107 -0)
src/App/Pages/Settings/LoginPasswordlessRequestsListPage.xaml.cs (+38 -0)
src/App/Pages/Settings/LoginPasswordlessRequestsListViewModel.cs (+139 -0)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs (+30 -3)
📝 src/App/Resources/AppResources.Designer.cs (+45 -0)
📝 src/App/Resources/AppResources.resx (+15 -0)
📝 src/Core/Abstractions/IAuthService.cs (+1 -0)
📝 src/Core/Services/AuthService.cs (+7 -0)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add a new entry in settings to navigate to a new screen containing all valid pending passwordless login requests displayed.

  • A valid request is not answered and is not expired (within 15 minutes)
  • Tapping one of the requests will launch the Approve/Decline modal
  • Pull to refresh will fetch updated login requests
  • There is a Decline all requests button to quickly decline all valid login requests
  • When all requests are declined by tapping the corresponding button, it will automatically navigate back to settings and show a toast stating “Requests declined“
  • When the user taps the settings entry, if there are no valid requests a toast will be displayed stating “No pending requests”
  • When in the pending login requests screen, if there are no items to display the app will automatically navigate back to settings
  • This new entry in settings will only appear if the device is allowed to accept login requests

Code changes

Screenshots

https://user-images.githubusercontent.com/4648522/212731650-7a7d626e-ec4d-4559-933c-e9349b0e0368.mov

https://user-images.githubusercontent.com/4648522/212732008-29d79332-842b-463b-beb4-24aea14dd667.mov

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2281 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 1/6/2023 **Status:** ✅ Merged **Merged:** 2/1/2023 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `beeep/login-requests-manager` --- ### 📝 Commits (10+) - [`9164d79`](https://github.com/bitwarden/android/commit/9164d799b8de0496481b10b51a23d7a33cf0a7ff) Bootstrap new classes for settings list - [`2097784`](https://github.com/bitwarden/android/commit/2097784572d98442e3c81482bff048518465f1fd) [SG-834] Add new method GetActivePasswordlessLoginRequestsAsync to AuthService - [`e18013c`](https://github.com/bitwarden/android/commit/e18013c57aebda482bdf729a624d308d13c88c2f) [SG-834] Add generic handle exception method to BaseViewModel - [`8570a59`](https://github.com/bitwarden/android/commit/8570a594d5ddf98ab810951381210ecb48fa9a2a) [SG-834] Add request verification to settings entry - [`e62f9ba`](https://github.com/bitwarden/android/commit/e62f9ba0f05bb057f1c126c1fa02dcd077e846a0) [SG-834] Add text resources - [`a17e787`](https://github.com/bitwarden/android/commit/a17e7870ce25f07d06777150e17af060cdc218ff) [SG-834] Update view and viewmodel - [`cf2acac`](https://github.com/bitwarden/android/commit/cf2acacd58981d00f336d857d8381a8e48a87b12) Merge branch 'master' into beeep/login-requests-manager - [`c07a207`](https://github.com/bitwarden/android/commit/c07a207206051a36df674372e065195435e5722d) Merge branch 'master' into beeep/login-requests-manager - [`f912950`](https://github.com/bitwarden/android/commit/f912950217639b38415c239581f3fb5a16cb121c) [SG-834] Remove unnecessary property assignment - [`7f165af`](https://github.com/bitwarden/android/commit/7f165afa8001046f833fc218f8c9869d28ba77eb) [SG-834] PR Fixes ### 📊 Changes **10 files changed** (+395 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Controls/ExtendedCollectionView.cs` (+12 -1) 📝 `src/App/Pages/Accounts/LoginPasswordlessViewModel.cs` (+1 -1) ➕ `src/App/Pages/Settings/LoginPasswordlessRequestsListPage.xaml` (+107 -0) ➕ `src/App/Pages/Settings/LoginPasswordlessRequestsListPage.xaml.cs` (+38 -0) ➕ `src/App/Pages/Settings/LoginPasswordlessRequestsListViewModel.cs` (+139 -0) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs` (+30 -3) 📝 `src/App/Resources/AppResources.Designer.cs` (+45 -0) 📝 `src/App/Resources/AppResources.resx` (+15 -0) 📝 `src/Core/Abstractions/IAuthService.cs` (+1 -0) 📝 `src/Core/Services/AuthService.cs` (+7 -0) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add a new entry in settings to navigate to a new screen containing all valid pending passwordless login requests displayed. - A valid request is not answered and is not expired (within 15 minutes) - Tapping one of the requests will launch the Approve/Decline modal - Pull to refresh will fetch updated login requests - There is a Decline all requests button to quickly decline all valid login requests - When all requests are declined by tapping the corresponding button, it will automatically navigate back to settings and show a toast stating “Requests declined“ - When the user taps the settings entry, if there are no valid requests a toast will be displayed stating “No pending requests” - When in the pending login requests screen, if there are no items to display the app will automatically navigate back to settings - This new entry in settings will only appear if the device is allowed to accept login requests ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **[src/App/Pages/Settings/LoginPasswordlessRequestsListViewModel.cs](https://github.com/bitwarden/mobile/pull/2281/files#diff-7a015ee8963b02e91cf0c145ef7c64b5b5c2b424960465862532297ba018c162R128):** Decline all requests creates a task pool to fire multiple requests in parallel instead of waiting for them sequentially. * **[src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs](https://github.com/bitwarden/mobile/pull/2281/files#diff-bce7881e23e99baec99687aac256ad3693130709ab596dfa2e4ff75550aca8e0R569):** Added validation to only show the entry if the user is approving login requests in the device. * **[src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs](https://github.com/bitwarden/mobile/pull/2281/files#diff-bce7881e23e99baec99687aac256ad3693130709ab596dfa2e4ff75550aca8e0R768):** Added navigation code for the new entry * **[src/Core/Services/AuthService.cs](https://github.com/bitwarden/mobile/pull/2281/files#diff-781c45fdcccb900874367021675efce138b93c8d979b6e536cd095b87656ffe7R497):** Added a more useful method to get only the valid login request to the `AutheService` ## Screenshots <!--Required for any UI changes. Delete if not applicable--> https://user-images.githubusercontent.com/4648522/212731650-7a7d626e-ec4d-4559-933c-e9349b0e0368.mov https://user-images.githubusercontent.com/4648522/212732008-29d79332-842b-463b-beb4-24aea14dd667.mov ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:33:21 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3480