[PR #2191] [MERGED] [SG-816] Get all login requests and pick the most recent #3417

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2191
Author: @andrebispo5
Created: 11/15/2022
Status: Merged
Merged: 11/15/2022
Merged by: @andrebispo5

Base: masterHead: bugfix/SG-816-login-request-sync


📝 Commits (7)

  • 19b7860 [SG-816] Get all login requests anfd pick the most recent
  • 9a70fac [SG-816] Add check if active user has approve login with device active
  • bef239a [SG-816] Build fix. Fix response model.
  • 5b0475a [SG-816] Move code to sync service
  • 1f1a3ff Merge branch 'master' into bugfix/SG-816-login-request-sync
  • 9486507 [SG-816] PR fixes
  • 78c7f20 [SG-816] PR fixes

📊 Changes

9 files changed (+75 additions, -5 deletions)

View changed files

📝 src/App/App.xaml.cs (+1 -2)
📝 src/App/Pages/Accounts/LoginPasswordlessViewModel.cs (+4 -2)
📝 src/Core/Abstractions/IApiService.cs (+1 -0)
📝 src/Core/Abstractions/IAuthService.cs (+1 -0)
📝 src/Core/Models/Response/PasswordlessLoginResponse.cs (+11 -0)
📝 src/Core/Services/ApiService.cs (+6 -0)
📝 src/Core/Services/AuthService.cs (+5 -0)
📝 src/Core/Services/SyncService.cs (+43 -0)
📝 src/Core/Utilities/ServiceContainer.cs (+3 -1)

📄 Description

Type of change

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

Objective

If the user for some reason did not receive the notification to login with the device, sync the vault will fetch all login requests and pick the most recent and valid one.

Code changes

  • SyncService.cs: when vault sync is triggered, get all login requests and set in the stateService the most recent. After that triggers a normal passwordless login request flow.

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/2191 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 11/15/2022 **Status:** ✅ Merged **Merged:** 11/15/2022 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `bugfix/SG-816-login-request-sync` --- ### 📝 Commits (7) - [`19b7860`](https://github.com/bitwarden/android/commit/19b786064f08dd00a304ee95d2c7327bc26e98ba) [SG-816] Get all login requests anfd pick the most recent - [`9a70fac`](https://github.com/bitwarden/android/commit/9a70faca318b62e1f30f0990f93765755e2e95e4) [SG-816] Add check if active user has approve login with device active - [`bef239a`](https://github.com/bitwarden/android/commit/bef239a290f3e8741d731f513927b59e58fb4afd) [SG-816] Build fix. Fix response model. - [`5b0475a`](https://github.com/bitwarden/android/commit/5b0475a894ed2392606707f4a7f49fbce311f351) [SG-816] Move code to sync service - [`1f1a3ff`](https://github.com/bitwarden/android/commit/1f1a3ffdc7f13185c796921c88da7e1e3b20e7a3) Merge branch 'master' into bugfix/SG-816-login-request-sync - [`9486507`](https://github.com/bitwarden/android/commit/94865072c2ad2d2143d717a2fb5352b10cc49331) [SG-816] PR fixes - [`78c7f20`](https://github.com/bitwarden/android/commit/78c7f20315b3eeb138d43e1f8d2ae17242d44c27) [SG-816] PR fixes ### 📊 Changes **9 files changed** (+75 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/App/App.xaml.cs` (+1 -2) 📝 `src/App/Pages/Accounts/LoginPasswordlessViewModel.cs` (+4 -2) 📝 `src/Core/Abstractions/IApiService.cs` (+1 -0) 📝 `src/Core/Abstractions/IAuthService.cs` (+1 -0) 📝 `src/Core/Models/Response/PasswordlessLoginResponse.cs` (+11 -0) 📝 `src/Core/Services/ApiService.cs` (+6 -0) 📝 `src/Core/Services/AuthService.cs` (+5 -0) 📝 `src/Core/Services/SyncService.cs` (+43 -0) 📝 `src/Core/Utilities/ServiceContainer.cs` (+3 -1) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] 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--> If the user for some reason did not receive the notification to login with the device, sync the vault will fetch all login requests and pick the most recent and valid one. ## 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--> * **SyncService.cs:** when vault sync is triggered, get all login requests and set in the stateService the most recent. After that triggers a normal passwordless login request flow. ## 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:32:27 -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#3417