Skip to content

docs: use the Motoko identity-attributes library for II attribute verification#286

Open
sea-snake wants to merge 2 commits into
mainfrom
docs/ii-attributes-motoko-library
Open

docs: use the Motoko identity-attributes library for II attribute verification#286
sea-snake wants to merge 2 commits into
mainfrom
docs/ii-attributes-motoko-library

Conversation

@sea-snake
Copy link
Copy Markdown
Contributor

Summary

Reframes the Internet Identity attribute flow in the authentication guide around the two-method protocol (_internet_identity_sign_in_start / _internet_identity_sign_in_finish): the mo:identity-attributes mixin provides it in Motoko, hand-written in Rust (no Rust library yet). One frontend works against either backend.

Changes

  • Frontend: nonce, sign-in, and requestAttributes run in parallel (nonce passed as a promise); requests name + verified_email; checks the { ok }/{ err } result.
  • Motoko tab: include IdentityAttributes({ onVerified }) plus mops.toml and icp.yaml env vars (trusted_attribute_signers, frontend_origins, optional trusted_sso_domains).
  • Rust tab: hand-implements the two methods with the full manual verification, mirroring the library.
  • Storing-the-nonce tip, common-mistakes entry, and the upstream footer updated (adds dfinity/motoko-identity-attributes).

Verification

  • The edited internet-identity.mdx compiles cleanly via @mdx-js/mdx.
  • Full astro build deferred to CI (the local sandbox lacked the .sources submodules; all sandbox build errors were on other pages, none on this file).

…ification

Reframe the Internet Identity attribute flow around the two-method protocol
(_internet_identity_sign_in_start / _internet_identity_sign_in_finish): the
mo:identity-attributes mixin provides it in Motoko, hand-written in Rust so a
single frontend works against either backend. The frontend now runs nonce,
sign-in, and the attribute request in parallel and requests name and
verified_email. Adds frontend_origins to the icp.yaml env vars and updates the
storing-the-nonce guidance and common-mistakes entry.
@sea-snake sea-snake requested review from a team as code owners June 3, 2026 15:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

🤖 Here's your preview: https://lvbky-nyaaa-aaaam-ai7tq-cai.icp0.io

…xample

verified_attributes already rejects callers without a trusted II bundle, so the inline anonymous check duplicated the Reject-anonymous-callers section. Mirrors the mo:identity-attributes mixin, which has no separate check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant