docs(internet-identity): explain how to serve an app at more than one origin - #339
Open
yhabib wants to merge 1 commit into
Open
docs(internet-identity): explain how to serve an app at more than one origin#339yhabib wants to merge 1 commit into
yhabib wants to merge 1 commit into
Conversation
… origin The skill's only substantive mention of derivationOrigin and ii-alternative-origins was Pitfall 8, telling the reader not to use them (correctly, for the icp0.io vs ic0.app case). An agent adding a custom domain to an II app therefore found a prohibition and no recipe, while custom-domains Pitfall 9 already pointed here for one. Adds the positive case: pick the canister address as the derivation origin, set derivationOrigin on the alternative origin only, and serve .well-known/ii-alternative-origins from the derivation origin's canister. On the @dfinity/static-site recipe the official docs' instructions do not work: they prescribe .ic-assets.json5, which is the legacy asset canister's config and is not read or even uploaded by static-site. The file also has no extension, so it needs a _headers entry to serve as application/json with CORS. Both are covered. Pitfall 8 now scopes itself to the icp0.io/ic0.app case it is about. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Skill Validation ReportValidating skill: /home/runner/work/icskills/icskills/skills/internet-identityStructure
Frontmatter
Tokens
Markdown
Tokens
Content Analysis
Contamination Analysis
Result: 2 warnings Project Checks |
This was referenced Aug 7, 2026
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.
Motivation
The skill only mentioned
derivationOriginandii-alternative-originsin Pitfall 8, to say don't use them. That is right for theicp0.iovsic0.appcase it covers, but it was the whole coverage, so an agent adding a custom domain to an II app found a prohibition and no recipe.custom-domainsPitfall 9 already pointed here for one. The engine console started surfacing this in dfinity/control-panel#3394 and dfinity/control-panel#3398.Changes
derivationOriginon the alternative origin only, and serve.well-known/ii-alternative-originsfrom the derivation origin's canister._headersblock the@dfinity/static-siterecipe needs. The official docs say to use.ic-assets.json5, which is the legacy asset canister's config — static-site does not read or upload it. The file also has no extension, so it will not serve asapplication/jsonwithout a_headersentry, and certified-assets sets no CORS header by default.icp0.io/ic0.appcase and pointed it at the new section.derivationOrigin") because the baseline scored 3/3 on it — it tested common knowledge, not the skill.I have not live-tested the II handshake end to end through a certified-assets canister. The
_headerstranslation is derived from thestatic-siteskill's documented behaviour. Happy to check it against a scratch deploy if you would rather not take it on inference.Eval 14 — Adversarial: alternative origins on the static-site recipe (WITH 3/3 | WITHOUT 2/3)
The baseline writes the JSON file and stops, which leaves it served with the wrong content type and no CORS header.
Next #340, #341