[PR #3862] [MERGED] PM-11604 Network layer for checking email token, nav to UI if needed. #4476

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3862
Author: @dseverns-livefront
Created: 9/4/2024
Status: Merged
Merged: 9/6/2024
Merged by: @dseverns-livefront

Base: mainHead: PM-11604-rebase-onto-11479


📝 Commits (7)

  • a1f00a2 PM-11604 Add network calls and data layer for verifying if email token is still valid and implementing correct routing
  • b110a74 integrate with UI
  • a617cf1 call names
  • 144dd35 pr feedback
  • a981571 add test
  • 5faadba Merge branch 'main' into PM-11604-rebase-onto-11479
  • d2f6e35 fmt and add tests

📊 Changes

26 files changed (+757 additions, -56 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/MainActivity.kt (+10 -0)
📝 app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt (+54 -8)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/api/UnauthenticatedIdentityApi.kt (+6 -0)
app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/VerifyEmailTokenRequestJson.kt (+18 -0)
app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/VerifyEmailTokenResponseJson.kt (+38 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityService.kt (+10 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityServiceImpl.kt (+33 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/manager/AuthRequestManager.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt (+9 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+28 -0)
app/src/main/java/com/x8bit/bitwarden/data/auth/repository/model/EmailTokenResult.kt (+22 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/SpecialCircumstanceManagerImpl.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/SpecialCircumstance.kt (+9 -5)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensions.kt (+4 -2)
📝 app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt (+9 -5)
📝 app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkViewModel.kt (+18 -2)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModel.kt (+20 -8)
📝 app/src/main/res/values/strings.xml (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/MainViewModelTest.kt (+173 -3)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityServiceTest.kt (+73 -0)

...and 6 more files

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-11604

📔 Objective

  • Add endpoint to the identity service to check for expired token status
  • If error message states the token is expired then mark the result as such
  • If we have expired token from email link use root nav state to navigate to the ExpiredLink screen.

📸 Screenshots

https://github.com/user-attachments/assets/2f2abb19-87ea-4841-b942-aa42dc135210

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/3862 **Author:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Created:** 9/4/2024 **Status:** ✅ Merged **Merged:** 9/6/2024 **Merged by:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Base:** `main` ← **Head:** `PM-11604-rebase-onto-11479` --- ### 📝 Commits (7) - [`a1f00a2`](https://github.com/bitwarden/android/commit/a1f00a2cd4da3e75d8d834f4eefa047dc4e74862) PM-11604 Add network calls and data layer for verifying if email token is still valid and implementing correct routing - [`b110a74`](https://github.com/bitwarden/android/commit/b110a744c62913281942139e2f625e2ed47cd875) integrate with UI - [`a617cf1`](https://github.com/bitwarden/android/commit/a617cf1b7a9a7ed9e26f3b3e85e79b8cc1743cb2) call names - [`144dd35`](https://github.com/bitwarden/android/commit/144dd35a1f14388eb0425f69b6d486a2a98384ab) pr feedback - [`a981571`](https://github.com/bitwarden/android/commit/a9815719a588d8ad24faea4e1408f783d29ab9dd) add test - [`5faadba`](https://github.com/bitwarden/android/commit/5faadba16d37091c979ebbb5baf288aecde1f4fb) Merge branch 'main' into PM-11604-rebase-onto-11479 - [`d2f6e35`](https://github.com/bitwarden/android/commit/d2f6e35bf4f63cc4abe513cfa8da6ffa151bac4b) fmt and add tests ### 📊 Changes **26 files changed** (+757 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/MainActivity.kt` (+10 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt` (+54 -8) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/api/UnauthenticatedIdentityApi.kt` (+6 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/VerifyEmailTokenRequestJson.kt` (+18 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/model/VerifyEmailTokenResponseJson.kt` (+38 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityService.kt` (+10 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityServiceImpl.kt` (+33 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/manager/AuthRequestManager.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt` (+9 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+28 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/auth/repository/model/EmailTokenResult.kt` (+22 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/SpecialCircumstanceManagerImpl.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/SpecialCircumstance.kt` (+9 -5) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensions.kt` (+4 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt` (+9 -5) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkViewModel.kt` (+18 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModel.kt` (+20 -8) 📝 `app/src/main/res/values/strings.xml` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/MainViewModelTest.kt` (+173 -3) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/datasource/network/service/IdentityServiceTest.kt` (+73 -0) _...and 6 more files_ </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-11604 <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective - Add endpoint to the identity service to check for expired token status - If error message states the token is expired then mark the result as such - If we have expired token from email link use root nav state to navigate to the ExpiredLink screen. <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## 📸 Screenshots https://github.com/user-attachments/assets/2f2abb19-87ea-4841-b942-aa42dc135210 <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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:45:00 -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#4476