Skip to content

Commit 0550e02

Browse files
atergaclaude
andauthored
fix(internet-identity): add frontend canister split (uqzsh-gqaaa-aaaaq-qaada-cai) (#130)
Internet Identity now has a separate frontend canister. Update the skill to reflect the backend/frontend split: canister IDs table, identity provider URLs, pitfall guidance, and code example. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 80e54e7 commit 0550e02

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

skills/internet-identity/SKILL.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ Internet Identity (II) is the Internet Computer's native authentication system.
2222

2323
| Canister | ID | URL | Purpose |
2424
|----------|------------|-----|---------|
25-
| Internet Identity | `rdmx6-jaaaa-aaaaa-aaadq-cai` | `https://id.ai` | Stores and manages user keys, serves the II web app over HTTPS |
25+
| Internet Identity (backend) | `rdmx6-jaaaa-aaaaa-aaadq-cai` | `https://backend.id.ai` | Manages user keys and authentication logic |
26+
| Internet Identity (frontend) | `uqzsh-gqaaa-aaaaq-qaada-cai` | `https://id.ai` | Serves the II web app; identity provider URL points here |
2627

2728
## Mistakes That Break Your Build
2829

29-
1. **Using the wrong II URL for the environment.** Local development must point to `http://rdmx6-jaaaa-aaaaa-aaadq-cai.localhost:8000`. Mainnet must use `https://id.ai`. Internet Identity has a well-known canister ID (`rdmx6-jaaaa-aaaaa-aaadq-cai`) that is the same on mainnet and local replicas -- hardcode it rather than doing a dynamic lookup.
30+
1. **Using the wrong II URL for the environment.** The identity provider URL must point to the **frontend** canister (`uqzsh-gqaaa-aaaaq-qaada-cai`), not the backend. Local development must use `http://uqzsh-gqaaa-aaaaq-qaada-cai.localhost:8000`. Mainnet must use `https://id.ai` (which resolves to the frontend canister). Both canister IDs are well-known and identical on mainnet and local replicas -- hardcode them rather than doing a dynamic lookup.
3031

3132
2. **Setting delegation expiry too long.** Maximum delegation expiry is 30 days (2_592_000_000_000_000 nanoseconds). Longer values are silently clamped, which causes confusing session behavior. Use 8 hours for normal apps, 30 days maximum for "remember me" flows.
3233

@@ -70,13 +71,14 @@ let authClient;
7071
const canisterEnv = safeGetCanisterEnv();
7172
7273
// Determine II URL based on environment.
73-
// Internet Identity has a well-known canister ID (rdmx6-jaaaa-aaaaa-aaadq-cai) that is
74-
// the same on mainnet and local replicas (icp-cli pulls the mainnet II wasm).
74+
// The identity provider URL points to the frontend canister (uqzsh-gqaaa-aaaaq-qaada-cai),
75+
// not the backend (rdmx6-jaaaa-aaaaa-aaadq-cai). Both are well-known IDs, identical on
76+
// mainnet and local replicas.
7577
function getIdentityProviderUrl() {
7678
const host = window.location.hostname;
7779
const isLocal = host === "localhost" || host === "127.0.0.1" || host.endsWith(".localhost");
7880
if (isLocal) {
79-
return "http://rdmx6-jaaaa-aaaaa-aaadq-cai.localhost:8000";
81+
return "http://uqzsh-gqaaa-aaaaq-qaada-cai.localhost:8000";
8082
}
8183
return "https://id.ai";
8284
}

0 commit comments

Comments
 (0)