Skip to content

docs: update Internet Identity guide for new AuthClient API (v7.0.0)#193

Merged
raymondk merged 7 commits intomainfrom
docs/auth-client-v6-update
May 4, 2026
Merged

docs: update Internet Identity guide for new AuthClient API (v7.0.0)#193
raymondk merged 7 commits intomainfrom
docs/auth-client-v6-update

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented May 4, 2026

Summary

  • Updates docs/guides/authentication/internet-identity.mdx for the @icp-sdk/auth v6/v7 breaking API changes:
    • AuthClient.create() replaced by new AuthClient({ identityProvider })
    • login({ onSuccess, onError }) replaced by promise-based await signIn()
    • logout() renamed to signOut()
    • isAuthenticated() is now sync; getIdentity() is now async
    • identityProvider, derivationOrigin, and openIdProvider move to the constructor
  • Adds one-click OpenID sign-in example (openIdProvider: 'google' | 'apple' | 'microsoft')
  • Adds identity attributes section: requestAttributes, AttributesIdentity, scopedKeys, and backend verification with msg_caller_info_data/msg_caller_info_signer (Motoko and Rust)
  • Updates alternative-origins example to set derivationOrigin on the constructor
  • Updates common-mistakes section for the new API

Supersedes #189 (contributor branch rebased onto main, submodule bumps added on top — all commits from the original author are preserved in history).

Submodule bumps included:

  • icp-js-sdk-docs17e4346 (auth v7.0.0, includes scopedKeys, SignedAttributes, updated AuthClient docs)
  • cdk-rs317f55c (ic-cdk v0.20.1, adds msg_caller_info_data/msg_caller_info_signer to ic_cdk::api)

Sync recommendation

informed by dfinity/icp-js-sdk-docs (public/auth/latest.zip — AuthClient, scopedKeys, SignedAttributes, AuthClientCreateOptions; public/core/latest.zip — AttributesIdentity); caffeinelabs/motoko (src/prelude/prim.mo, test/run-drun/caller-info/); dfinity/cdk-rs (ic-cdk/src/api.rs)

sea-snake and others added 7 commits May 5, 2026 00:34
The @icp-sdk/auth library was updated: AuthClient is now constructed
directly (not via a static factory), sign-in is promise-based, and
isAuthenticated() and getIdentity() flipped sync/async. Also moves
identityProvider, derivationOrigin, and openIdProvider onto the
constructor, and adds a one-click OpenID example.
…eam comment

- Bumps .sources/icp-js-sdk-docs to 17e4346 (auth v7.0.0)
- Fixes broken ../../reference/ link to ../../references/ (internet-identity-spec.md)
- Updates Upstream comment to reference icp-js-sdk-docs submodule instead of upstream source repo
Adds msg_caller_info_data and msg_caller_info_signer to ic_cdk::api,
which are required by the Rust backend example in the Internet Identity
guide (identity attributes section).

No other user-facing API changes between 0.19.0 and 0.20.1.
@raymondk raymondk merged commit 60d0bea into main May 4, 2026
6 checks passed
@raymondk raymondk deleted the docs/auth-client-v6-update branch May 4, 2026 23:14
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.

3 participants