woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

[HACK] Add auto-login universal link for debug builds

Open kidinov opened this issue 1 week ago • 3 comments

Description

Adds support for a universal link that allows automatic login using application password credentials in debug builds. This is useful for developer and testing workflows.

URL Format:

https://woocommerce.com/mobile/auto-login?site=<encoded_site_url>&user=<username>&password=<app_password>

Example (with placeholder credentials):

adb shell "am start -a android.intent.action.VIEW -d 'https://woocommerce.com/mobile/auto-login?site=https%3A%2F%2Fexample.com&user=testuser&password=xxxx-xxxx-xxxx-xxxx'"

Behavior:

  • Debug builds only (intent filter in debug manifest)
  • If already logged in, navigates directly to main screen
  • On success, navigates to main screen
  • On error, shows toast and opens login screen

Do not merge, as I am not sure how valuable this is for anyone so I firstly would like to ask

Test Steps

  1. Install debug build
  2. Clear app data to ensure logged out state
  3. Run the adb command above with valid site credentials
  4. Verify the app logs in and navigates to the main screen
  • [x] I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

kidinov avatar Dec 05 '25 04:12 kidinov

2 Errors
:no_entry_sign: Please add tests for class AutoLoginHandler (or add unit-tests-exemption label to ignore this).
:no_entry_sign: This PR is tagged with status: do not merge label(s).

Generated by :no_entry_sign: Danger

dangermattic avatar Dec 05 '25 04:12 dangermattic

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit6114afb50a8b3523f3d3a5f3db3b6300969038c3
Direct Downloadwoocommerce-wear-prototype-build-pr15062-6114afb.apk

wpmobilebot avatar Dec 05 '25 04:12 wpmobilebot

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit6114afb50a8b3523f3d3a5f3db3b6300969038c3
Direct Downloadwoocommerce-prototype-build-pr15062-6114afb.apk

wpmobilebot avatar Dec 05 '25 04:12 wpmobilebot