Skip to content

feat: add aasp route support#39

Merged
sirily11 merged 2 commits into
mainfrom
native-device-support
May 26, 2026
Merged

feat: add aasp route support#39
sirily11 merged 2 commits into
mainfrom
native-device-support

Conversation

@sirily11

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 26, 2026 07:12
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxlab-auth Ready Ready Preview, Comment May 26, 2026 7:13am

Request Review

@autopilot-project-manager autopilot-project-manager Bot added the enhancement New feature or request label May 26, 2026
@sirily11 sirily11 enabled auto-merge (squash) May 26, 2026 07:13

Copilot AI 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.

Pull request overview

This PR adds Apple App Site Association (AASA) support by introducing a way to register Apple app identifiers (<TEAMID>.<BUNDLEID>) per OAuth client, publishing them via a new /.well-known/apple-app-site-association route for passkey domain binding.

Changes:

  • Add a new oauth_client_app_ids table + migration to persist Apple app IDs tied to OAuth clients.
  • Add an AASA payload builder (with unit tests) and a new Next.js route to serve webcredentials.apps.
  • Extend the admin client detail UI and server actions to add/remove app IDs, plus E2E endpoints/tests for seeding and validating AASA output.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/validations/admin.ts Adds Zod validation for registering Apple app IDs on a client.
lib/db/schema/oauth-client-app-ids.ts Introduces Drizzle schema for persisted OAuth client app IDs.
lib/db/schema/index.ts Re-exports the new schema module.
lib/db/migrations/meta/0006_snapshot.json Updates Drizzle migration snapshot to include the new table.
lib/db/migrations/meta/_journal.json Adds migration journal entry for version 6.
lib/db/migrations/0006_familiar_mandarin.sql Creates oauth_client_app_ids table and indexes.
lib/aasa/build-aasa.ts Adds helper to build a stable AASA document from app IDs.
lib/aasa/build-aasa.test.ts Unit tests for deduplication/sorting and AASA document shape.
e2e/aasa.spec.ts Playwright E2E coverage for AASA route output and union semantics.
components/admin/client-detail-tabs.tsx Wires app IDs into the admin client detail view.
components/admin/client-app-ids-card.tsx Adds UI card for adding/removing Apple app IDs per client.
app/api/e2e/oauth-client-app-ids/route.ts Adds E2E-only API for seeding/clearing app IDs without UI.
app/admin/dashboard/clients/[id]/page.tsx Fetches app IDs for the client detail page.
app/.well-known/apple-app-site-association/route.ts Serves the AASA JSON payload derived from stored app IDs.
actions/admin/clients/app-ids.ts Adds server actions for listing/adding/removing app IDs + cache revalidation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +47 to +55
setAppIds([
{
id: result.id,
clientId,
appId: trimmed,
createdAt: new Date(),
},
...appIds,
]);
Comment on lines +70 to +72
if (result.success) {
setAppIds(appIds.filter((a) => a.id !== id));
} else {
try {
await requireAdmin();

await db.delete(oauthClientAppIds).where(eq(oauthClientAppIds.id, id));
Comment thread lib/validations/admin.ts
// Apple app identifier: <TEAMID>.<BUNDLEID>
// - TEAMID: 10-char uppercase alphanumeric Apple Developer Team ID
// - BUNDLEID: reverse-DNS bundle id (letters, digits, dots, dashes)
const appleAppIdRegex = /^[A-Z0-9]{10}\.[A-Za-z0-9][A-Za-z0-9.\-]*$/;
@sirily11 sirily11 merged commit 2ef7d4d into main May 26, 2026
4 checks passed
@sirily11 sirily11 deleted the native-device-support branch May 26, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants