fix(wallet): playground II login and local reproducible-build fixes#637
Open
aterga wants to merge 3 commits into
Open
fix(wallet): playground II login and local reproducible-build fixes#637aterga wants to merge 3 commits into
aterga wants to merge 3 commits into
Conversation
Since the orbit.global domain migration (#520), every IC-hosted build (including playground and testing) sent derivationOrigin 'https://orbitwallet.io' to Internet Identity. II validates the page origin against that domain's /.well-known/ii-alternative-origins, which only lists 'https://app.orbit.global', so logins from playground/testing origins were rejected with 'Unverified origin'. Non-production build modes now authenticate against their own origin, restoring the pre-migration behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…trees
Two issues broke ./scripts/docker-build.sh on developer machines:
- .dockerignore only excluded the repo-root node_modules; Docker
patterns are not recursive, so nested installs (apps/wallet, docs,
cli) leaked host-specific pnpm symlinks into the build context and
corrupted the in-image pnpm install (vite binary missing). Use
**/node_modules to exclude them at any depth.
- On Apple Silicon, buildx default provenance attestations wrap the
image in a manifest list that the subsequent 'docker create' cannot
resolve for linux/amd64 ('no match for platform'). Disable them with
--provenance=false.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Created by scripts/deploy.sh --playground while restoring the wiped playground environment (the control_panel had run out of cycles and lost its module). Key order normalized by dfx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No security or compliance issues detected. Reviewed everything up to a0371b8. Security Overview
Detected Code Changes
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores/repairs the playground deployment workflow for Orbit Wallet by fixing Internet Identity login behavior in non-production IC-hosted builds, improving local reproducible Docker builds when nested node_modules exist, and recording the restored playground docs_portal canister id.
Changes:
- Gate
derivationOriginso it’s only set for the wallet’sproductionbuild mode (fixes II “Unverified origin” on playground/testing). - Improve local reproducible Docker builds by excluding nested
node_modulesfrom the build context and disabling provenance attestations to avoid manifest-list extraction issues on non-amd64 hosts. - Add the restored playground
docs_portalcanister id tocanister_ids.json.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
apps/wallet/src/configs/init.config.ts |
Restricts II derivationOrigin usage to production build mode to fix playground/testing login. |
scripts/docker-build.sh |
Adds --provenance=false to keep output compatible with docker create on non-amd64 hosts. |
.dockerignore |
Excludes nested node_modules directories from Docker build context. |
canister_ids.json |
Records the playground docs_portal canister id and reorders entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes found while restoring the wiped playground environment (control_panel had run out of cycles and lost its module) and redeploying it end to end.
1. Internet Identity "Unverified origin" on playground/testing builds
Since the orbit.global domain migration (#520),
derivationOriginwas gated only onimport.meta.env.PROD, which istruefor all IC-hosted build modes — playground and testing included (.envsetsAPP_MODE=productionand the mode env files don't override it). Those builds therefore asked II to derive fromhttps://orbitwallet.io, whose/.well-known/ii-alternative-originsonly listshttps://app.orbit.global, so II rejected every playground/testing login with Unverified origin.derivationOriginis now only set when the build mode isproduction; other modes authenticate against their own origin (the pre-#520 behavior). Verified live on the redeployed playground wallet.2. Local
./scripts/docker-build.shfailures from dirty working trees.dockerignoreonly excluded the repo-rootnode_modules; Docker patterns are not recursive, so nested installs (apps/wallet,docs,cli) leaked host pnpm symlinks into the build context and corrupted the in-image install (Cannot find module .../vite/bin/vite.js). Now**/node_modules.docker createcan't resolve forlinux/amd64(no match for platform). Disabled with--provenance=false.3. Playground
docs_portalcanister idscripts/deploy.sh --playgroundcreated the canister during the environment restore; this records its id (d537j-aaaaa-aaaal-asz5q-cai).Test plan
BUILD_MODE=playgroundand synced to the playground canister: bundle bakesderivationOrigin: undefined, II login no longer shows "Unverified origin".PROD && APP_BUILD_MODE === 'production'still yieldshttps://orbitwallet.io.docker-build.sh --wallet-dapp/--control-panelrun clean on macOS (arm64) with nestednode_modulespresent.🤖 Generated with Claude Code