Skip to content

Migrate Android sample to AuthTabIntent#513

Draft
markmur wants to merge 1 commit into
migrate-demo-to-aswebauthenticationsessionfrom
android-customer-accounts-auth-tab
Draft

Migrate Android sample to AuthTabIntent#513
markmur wants to merge 1 commit into
migrate-demo-to-aswebauthenticationsessionfrom
android-customer-accounts-auth-tab

Conversation

@markmur

@markmur markmur commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

https://developer.chrome.com/docs/android/custom-tabs/guide-auth-tab

Migrates the Android demo's Customer Account API authentication from an embedded WebView to the system browser:

  • Uses AndroidX Auth Tab when the selected browser supports it, with a Custom Tabs/deep-link fallback.
  • Uses the browser's shared session by default so sign-in and interactive logout participate in browser SSO.
  • Keeps Customer Account integration explicit by continuing to pass the access token into Storefront cart buyer identity.
  • Clears the cart and invalidates preloaded Checkout Kit state when authentication changes.

The OAuth flow is also hardened to make the sample a safer recommendation for consumers:

  • Authorization Code + PKCE S256 with cryptographically random verifier, state, and nonce values.
  • Strict redirect matching across scheme, host, port, and path, including duplicate parameter rejection and OAuth error handling.
  • OIDC issuer, audience, authorized-party, expiry, issued-at, subject, and nonce validation for ID tokens returned by Shopify's token endpoint.
  • Interactive browser logout using id_token_hint and post_logout_redirect_uri, while always clearing local credentials on completion, cancellation, or failure.
  • Android Keystore-backed AES-GCM credential encryption and backup/device-transfer exclusions.
  • Removal of token response and customer PII logging.
  • Documentation recommending a verified HTTPS App Link for production redirect handling.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 23, 2026

markmur commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@markmur markmur changed the title Abstract customer accounts api to ShopifyCustomerAccounts # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # HEAD detached at c9738a97 # Changes to be committed: # mod Abstract customer accounts api to ShopifyCustomerAccounts Jul 23, 2026
@markmur
markmur force-pushed the android-customer-accounts-auth-tab branch from a836123 to 14c9fdf Compare July 23, 2026 19:40
@markmur markmur changed the title Abstract customer accounts api to ShopifyCustomerAccounts Migrate Android sample to AuthIntent Jul 23, 2026
@markmur markmur changed the title Migrate Android sample to AuthIntent Migrate Android sample to AuthTabIntent Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant