Skip to content

feat(console): add signing certificate fingerprints to Android apps - #14362

Merged
ChiragAgg5k merged 3 commits into
mainfrom
feat/console-android-fingerprints
Oct 12, 2026
Merged

ChiragAgg5k merged 3 commits into
mainfrom
feat/console-android-fingerprints

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds the Console side of passkeys for Android apps (#14353).

  • App drawer: Android apps get a "Signing certificate fingerprints" field, one per line. Fingerprints are checked before saving (32 colon-separated hex pairs), uppercased, de-duplicated, and sent with the update. The policy query is then refreshed, because passkey origins come from the platforms.
  • Where passkeys work: Android origins (android:apk-key-hash:…) are listed with an "(Android app)" label, on one truncated line with the full origin on hover. The preview for an unsaved relying party ID derives them the same way the server does.
  • SDK: @appwrite.io/console moves from 18.4.0-rc.1 to 18.4.0-rc.2. That's rc.1 plus fingerprints on the Android platform calls and model, and it still has Videos.

The create-app wizard is unchanged; fingerprints are added from the drawer after the app is created.

App drawer Invalid fingerprint
Fingerprints in the app drawer Invalid fingerprint

Where passkeys work with an Android app

Test Plan

  • e2e/console.mocked.passkeys.spec.ts, now 16 tests, all passing:
    • Android origins show on the policy card and in the preview for an unsaved domain
    • the drawer rejects an invalid fingerprint without calling the API
    • the drawer sends the fingerprints uppercased and de-duplicated
  • ESLint and Prettier are clean on the changed files, and no type errors in them.

Related: appwrite-labs/cloud#5805

Passkeys created in an Android app are accepted once its signing certificate fingerprint is on the platform (#14353). The app drawer edits them, and the passkey preview and origin list show the Android origins.
…app drawer

Also keeps a long Android origin on one truncated line beside its label.
@ChiragAgg5k
ChiragAgg5k marked this pull request as ready for review October 12, 2026 11:41
@luxor-code-review

luxor-code-review Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 1 medium

📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to

🟡 Medium — Platform create/delete skip passkey cache invalidation · projects.ts:1445–1454 · unchanged line

// apps/console/src/lib/react-query/hooks/projects.ts
1445	    onSuccess: async () => {
1446	      await queryClient.invalidateQueries({
1447	        queryKey: ['platforms', projectId],
1448	        refetchType: 'all',
1449	      })
1450	      await queryClient.invalidateQueries({
1451	        queryKey: ['project', projectId],
1452	        refetchType: 'all',
1453	      })
1454	    },

The PR adds an invalidation of ['project-auth-security', projectId] to useUpdatePlatform so passkey origins recompute, but only on update (projects.ts:1420-1423). useDeletePlatform and useCreatePlatform invalidate only ['platforms', projectId] and ['project', projectId] (projects.ts:1445-1454, 1480-1493). Since platformPasskeyOrigins derives origins from Android fingerprints, web hostnames, and Apple-platform presence, creating or deleting a platform changes that query's data. After deleting the platform carrying a passkey origin, the Auth > Security view keeps showing stale origins until an unrelated refetch.


This PR lets Console users attach SHA-256 signing fingerprints to Android platforms so the resulting android:apk-key-hash: passkey origins are derived client-side and validated against the server's ceremony.

Files Change
apps/console/src/lib/passkey-policy.ts Adds androidPasskeyOrigin derivation (hex decode + base64url, no padding) and fingerprint validation mirroring the PHP Ceremony logic.
apps/console/src/components/pages/projects/$projectId/apps/_components/PlatformDrawer.tsx Adds a fingerprints textarea for Android platforms, validation, and passkey-origin preview.
apps/console/src/lib/react-query/hooks/projects.ts Extends updatePlatform to send fingerprints for Android updates and invalidates the auth-security query.
apps/console/e2e/console.mocked.passkeys.spec.ts Adds mocked e2e coverage for passkey origin display and fingerprint-based Android platform updates.
apps/console/package.json, apps/console/bun.lock Bumps the @appwrite.io/console SDK dependency.

Reviewed commit: 05e241c

@ghost

ghost commented Oct 12, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

Adds Android signing-certificate fingerprint editing to the app drawer and displays the resulting Android passkey origins in policy views and previews. Updates the Console SDK dependency and adds end-to-end coverage for Android origins and fingerprint validation and saving.

Latest changes: The new commits replace regex-based fingerprint parsing, validation, and Base64 URL cleanup with string operations, and await an all-query refresh of auth-security data after platform updates.

Verdict New comments Fixed Still open
✅ Approved 0 2 0
📂 Walkthrough · 7
File Change
apps/console/bun.lock Updates the resolved Console SDK dependency to rc.2.
apps/console/e2e/console.mocked.passkeys.spec.ts Adds mocked end-to-end coverage for Android passkey origins and fingerprint validation and saving.
apps/console/package.json Bumps the Console SDK dependency to rc.2.
apps/console/src/components/pages/projects/$projectId/apps/_components/PlatformDrawer.tsx Adds fingerprint editing, validation, normalization, and submission for Android platforms.
apps/console/src/components/pages/projects/$projectId/auth/PasskeyOrigins.tsx Displays Android passkey origins with an app label and truncated presentation.
apps/console/src/lib/passkey-policy.ts Validates certificate fingerprints and derives Android passkey origins for policy previews.
apps/console/src/lib/react-query/hooks/projects.ts Sends fingerprints with platform updates and refreshes cached platform and auth-security data.
✅ Fixed since the last review · 2
  • Refetch cached auth policy after platform updates · apps/console/src/lib/react-query/hooks/projects.ts:1421
  • Avoid regex in fingerprint validation · apps/console/src/lib/passkey-policy.ts:47

Reviewed the commits since 05e241c · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · See the inline comments. Summary

Comment thread apps/console/src/lib/passkey-policy.ts Resolved
…gexes

The passkey policy route reads its cache without refetching on mount, so a platform update now refetches it even when inactive. Fingerprint parsing and the base64url conversion use string functions, as the repository requires.
@ChiragAgg5k ChiragAgg5k self-assigned this Oct 12, 2026

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 0d33bc8 into main Oct 12, 2026
68 of 72 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.

1 participant