Skip to content

[PM-32122] Add cookie acquisition navigation#6529

Draft
SaintPatrck wants to merge 2 commits intomainfrom
cookie-vending/p11-t12_navigation
Draft

[PM-32122] Add cookie acquisition navigation#6529
SaintPatrck wants to merge 2 commits intomainfrom
cookie-vending/p11-t12_navigation

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Feb 12, 2026

🎟️ Tracking

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

📔 Objective

Add the cookie acquisition deeplink callback wiring, and root navigation integration for the SSO cookie sync flow.

  • Wire the bitwarden://sso_cookie_vendor deeplink callback through AuthCallbackViewModel to AuthRepository.setCookieCallbackResult()
  • Add RootNav routing for cookie acquisition with slide-up transitions, giving it precedence over all special circumstances
  • Add debug menu trigger for cookie acquisition flow
  • Include comprehensive unit tests for ViewModel, Screen, AuthCallback, DebugMenu, and RootNav changes

📸 Screenshots

Screen_recording_20260212_160150.mp4

SaintPatrck and others added 2 commits February 12, 2026 13:52
Implement the cookie acquisition UI for browser-to-app cookie
synchronization. This screen is presented when the SDK requests
cookies for a hostname, allowing the user to launch a browser
to complete sign-in and sync cookies back to the app.

- Add CookieAcquisitionViewModel with SAE pattern, subscribing
  to cookieCallbackResultFlow for acquisition results
- Add CookieAcquisitionScreen with illustration, launch browser
  button, continue without syncing option, and help link
- Add CookieAcquisitionNavigation with type-safe route
- Add CookieAcquisitionHandler for extracted action callbacks
- Add named path attributes to ill_sso_cookie_sync.xml for
  theme-aware coloring
- Add string resources for screen text
- Add ViewModel and Screen unit tests (18 tests)

Co-Authored-By: Claude <noreply@anthropic.com>
Connect the cookie callback deeplink to AuthRepository so
CookieAcquisitionViewModel receives results via cookieCallbackResultFlow.
Add RootNav routing for the cookie acquisition screen with slide-up
transitions and give it precedence over all special circumstances.
Include debug menu trigger and associated tests.

Co-Authored-By: Claude <noreply@anthropic.com>
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners February 12, 2026 20:53
@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context labels Feb 12, 2026
@SaintPatrck SaintPatrck marked this pull request as draft February 12, 2026 20:53
@SaintPatrck SaintPatrck changed the title [PM-32122] Add cookie acquisition screen and navigation [PM-32122] Add cookie acquisition navigation Feb 12, 2026
@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailse10a3949-c072-4716-8191-d870119bfa54

Great job! No new security vulnerabilities introduced in this pull request

is RootNavState.VaultUnlocked -> {
if (!navController.popBackStack(
route = CookieAcquisitionRoute,
inclusive = true,
Copy link
Collaborator

@david-livefront david-livefront Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this popBackStack needed. I would expect the properties on the rootNavOptions would handle it for you.

Also curious why the navigate is surrounded by the if?

action.cookieAcquisitionRequest.hostname ==
userState.activeAccount.environment.environmentUrlData
.baseWebVaultUrlOrDefault -> {
RootNavState.VaultUnlockedForCookieAcquisition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems too low in the priority.

If a user gets the SetPassword state but the cookie needs refreshing they will be locked out of the app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants