[PR #1895] [MERGED] [PS-77] Added DeviceId to the TwoFactor token request #3208

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1895
Author: @fedemkr
Created: 4/28/2022
Status: Merged
Merged: 4/28/2022
Merged by: @fedemkr

Base: masterHead: PS-77-fix-2fa-new-devices-resend


📝 Commits (2)

  • fee5d84 PS-77 Updated two-factor email request to include the device identifier to check whether to send the 2fa email because of a new device
  • a1bf9d7 Merge branch 'master' into PS-77-fix-2fa-new-devices-resend

📊 Changes

2 files changed (+5 additions, -1 deletions)

View changed files

📝 src/App/Pages/Accounts/TwoFactorPageViewModel.cs (+4 -1)
📝 src/Core/Models/Request/TwoFactorEmailRequest.cs (+1 -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 DeviceId to the 2FA email request and set it when calling the endpoint of resending the 2FA email to see if the 2FA email is because of a new device login.

Depends on: Server change

Code changes

  • TwoFactorEmailRequest: Added DeviceIdentifier
  • TwoFactorPageViewModel: Set deviceIdentifier to the TwoFactorEmailRequest to check then if it's a 2FA email of a new device login.

Testing requirements

When logging in on a new device with email verified and being on the verification code view, on resending the verification code the user should receive the email correctly.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • 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/1895 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 4/28/2022 **Status:** ✅ Merged **Merged:** 4/28/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `PS-77-fix-2fa-new-devices-resend` --- ### 📝 Commits (2) - [`fee5d84`](https://github.com/bitwarden/android/commit/fee5d84a3fff33826fb32d01ae567743586c8fac) PS-77 Updated two-factor email request to include the device identifier to check whether to send the 2fa email because of a new device - [`a1bf9d7`](https://github.com/bitwarden/android/commit/a1bf9d73b68d07fbb4dec82ea2712d4f0cbc2168) Merge branch 'master' into PS-77-fix-2fa-new-devices-resend ### 📊 Changes **2 files changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/TwoFactorPageViewModel.cs` (+4 -1) 📝 `src/Core/Models/Request/TwoFactorEmailRequest.cs` (+1 -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 DeviceId to the 2FA email request and set it when calling the endpoint of resending the 2FA email to see if the 2FA email is because of a new device login. Depends on: [Server change](https://github.com/bitwarden/server/pull/1977) ## 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--> * **TwoFactorEmailRequest:** Added `DeviceIdentifier` * **TwoFactorPageViewModel:** Set deviceIdentifier to the TwoFactorEmailRequest to check then if it's a 2FA email of a new device login. ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> When logging in on a new device with email verified and being on the verification code view, on resending the verification code the user should receive the email correctly. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] 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:29:42 -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#3208