-
Notifications
You must be signed in to change notification settings - Fork 163
chore: Split Internet Identity canister frontend #3536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 separates the Internet Identity canister frontend into a dedicated canister to better isolate orthogonal concerns and simplify the architecture.
- Introduces a new
internet_identity_frontendcanister that serves static assets with HTTP certification - Updates build scripts to support building the new frontend canister independently
- Adds new localization strings for recovery phrase verification and in-app browser workflows
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/internet_identity_frontend/src/main.rs | New canister implementation for serving certified static assets with security headers and CSP |
| src/internet_identity_frontend/internet_identity_frontend.did | Candid interface definition for HTTP request/response handling |
| src/internet_identity_frontend/README.md | Documentation explaining the new frontend canister's purpose |
| src/internet_identity_frontend/Cargo.toml | Dependencies for the new frontend canister |
| src/internet_identity/Cargo.toml | Pin rand dependency versions to specific releases |
| src/frontend/src/lib/locales/*.po | Add new translation strings for recovery phrase verification and browser navigation |
| scripts/build | Add build support for the new frontend canister |
| dfx.json | Configure deployment of the new frontend canister |
| Cargo.toml | Add frontend canister to workspace and upgrade certification libraries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| /// Fix up HTML pages by injecting canister ID and canister config | ||
| fn fixup_html(html: &str, config: &InternetIdentityInit) -> String { | ||
| let canister_id = Principal::from_text("u6s2n-gx777-77774-qaaba-cai").unwrap(); |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded canister ID appears to be a placeholder or test value. Consider making this configurable via init arguments or an environment variable to avoid potential issues when deploying to different environments.
| let canister_id = Principal::from_text("u6s2n-gx777-77774-qaaba-cai").unwrap(); | |
| let canister_id = config.canister_id; |
|
|
||
|
|
||
| [features] | ||
| # The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance. |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'oder' to 'order'.
| # The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance. | |
| # The dev_csp feature weakens the CSP in order to facilitate development with a locally deployed II instance. |
| # The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance. | ||
| # In particular, this allows | ||
| # * accessing II using http instead of https | ||
| # * II to connect to localhost both on http and https, which is useful when developint a vc issuer |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'developint' to 'developing'.
| # * II to connect to localhost both on http and https, which is useful when developint a vc issuer | |
| # * II to connect to localhost both on http and https, which is useful when developing a vc issuer |
Motivation
Separate orthogonal concerns.