Skip to content

feat(expo-example): add Passkey auth and test on Android#124

Merged
andrascodes merged 1 commit into
mainfrom
andras/feat-expo-example-add-passkey-auth-and-test-on-android
May 14, 2026
Merged

feat(expo-example): add Passkey auth and test on Android#124
andrascodes merged 1 commit into
mainfrom
andras/feat-expo-example-add-passkey-auth-and-test-on-android

Conversation

@andrascodes
Copy link
Copy Markdown
Collaborator

@andrascodes andrascodes commented Apr 24, 2026

This PR is part of a stack created with Aviator.

Closes FS-1928, FS-1999

The main purpose of the PR is setting up the Android build in a way that we can accomplish a PasskeyAuth on Android Emulator. Since the PasskeyStamper is already committed to the expo-example repo I just added a component to the app to trigger the Passkey register/login (using the hook) - no other changes were needed to make it work.

Changes explained:

  • assetlinks.json: a static json file deployed at zerodev-expo-example.vercel.app, this connects the domain to the app for App Links and Passkeys both
  • debug.keystore: the app build needs to be signed with a key and the resulting fingerprint is added to the assetlinks.json file this makes the connection between the app and the domain - this keystore is committed so every contributor can use it to sign the builds and test Passkeys and App Links
  • withDebugKeystore.js: expo plugin applied so the Android prebuilds use the debug.keystore instead of the one on the contributor's machine
  • Separated the wagmi.config files for platform specific ones
  • eas.json: setting up the EAS CLI for creating a local APK build that can be installed on a physical device or emulator, credentials.json is what this is looking for to get the signing credentials for the build
    • So there's the Expo Development build that you get by running pnpm android and a local APK build you get by running pnpm dlx eas-cli build --platform android --local --profile preview. Both will use the committed debug.keystore for signing so Passkeys and App Links will work on both (both looks at the zerodev-expo-example.vercel.app domain for verification).

"storeFile file('debug.keystore')",
"storeFile file('../../credentials/debug.keystore')",
)
return config
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If Expo ever changes the prebuild template (different quote style, extra config block, etc.), this replace becomes a no-op and signing silently falls back to ~/.android/debug.keystore per machine — passkeys then break with no useful error.

Worth asserting the replacement actually happened:

const before = config.modResults.contents
config.modResults.contents = before.replace(
  "storeFile file('debug.keystore')",
  "storeFile file('../../credentials/debug.keystore')",
)
if (config.modResults.contents === before) {
  throw new Error("withDebugKeystore: storeFile pattern not found in build.gradle — Expo prebuild template may have changed")
}

Fails loud at prebuild time instead of silently breaking passkeys at runtime.

Copy link
Copy Markdown
Collaborator

@SahilVasava SahilVasava left a comment

Choose a reason for hiding this comment

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

Solid. One nit on the prebuild plugin to fail loud instead of silent.

@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from a5a4190 to 7511324 Compare May 4, 2026 13:12
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch from 358ac5e to 8541e6d Compare May 4, 2026 13:12
@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from 7511324 to a8f78a3 Compare May 4, 2026 16:56
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch from 8541e6d to 0438fa5 Compare May 4, 2026 16:56
@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from a8f78a3 to cfa9016 Compare May 5, 2026 11:02
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch 2 times, most recently from b3374f2 to 237bac1 Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from cfa9016 to 1563159 Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from 1563159 to e10eb90 Compare May 5, 2026 13:22
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch 2 times, most recently from 9ffe3f0 to d2a050e Compare May 5, 2026 14:31
@andrascodes andrascodes force-pushed the andras/feat-add-expo-example-app branch from e10eb90 to 75bbeaf Compare May 5, 2026 14:31
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch from d2a050e to 9719484 Compare May 5, 2026 14:51
@andrascodes andrascodes requested a review from SahilVasava May 5, 2026 16:09
@andrascodes andrascodes changed the base branch from andras/feat-add-expo-example-app to main May 13, 2026 17:08
@andrascodes andrascodes force-pushed the andras/feat-expo-example-add-passkey-auth-and-test-on-android branch from c50c4eb to 0581bb2 Compare May 13, 2026 17:08
@andrascodes andrascodes merged commit 71234a6 into main May 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants