Skip to content
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

feat: introduces partial identity #812

Merged
merged 4 commits into from Dec 18, 2023
Merged

feat: introduces partial identity #812

merged 4 commits into from Dec 18, 2023

Conversation

krpeacock
Copy link
Contributor

@krpeacock krpeacock commented Dec 12, 2023

Description

To get a delegation from Internet Identity, the Auth Client allowed the developer to initialize the client using an existing identity. However, since the delegation can target any public key, it can be useful to allow the client to accept a "partial" identity class without a private key.

Introduces the PartialIdentity and PartialDelegationIdentity classes in @dfinity/identity, which can now be passed into AuthClient.create

This will be useful to remove the limitations such as adding an intermediary identity, as used by our deep link example: https://github.com/dfinity/examples/blob/c62de1a928fa0bf6b8fdbbbf0e0204e7cf5d6dfb/native-apps/unity_ii_applink/ii_integration_dapp/src/greet_frontend/src/index.js#L49

How Has This Been Tested?

New Unit tests

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@krpeacock krpeacock requested a review from a team as a code owner December 12, 2023 00:03
Copy link
Contributor

size-limit report 📦

Path Size
@dfinity/agent 99.52 KB (0%)
@dfinity/candid 13.56 KB (0%)
@dfinity/principal 5.02 KB (0%)
@dfinity/auth-client 91.12 KB (+0.35% 🔺)
@dfinity/assets 91.7 KB (0%)
@dfinity/identity 88.63 KB (+0.23% 🔺)
@dfinity/identity-secp256k1 255.47 KB (0%)

@krpeacock krpeacock merged commit ca161c8 into main Dec 18, 2023
59 checks passed
@krpeacock krpeacock deleted the kyle/partial-identity branch December 18, 2023 23:36
b3hr4d added a commit to b3hr4d/agent-js that referenced this pull request Dec 21, 2023
feat: introduces partial identity (dfinity#812)
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.

None yet

2 participants