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

WIP connect to sdk #2373

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

WIP connect to sdk #2373

wants to merge 19 commits into from

Conversation

Ghislain89
Copy link
Contributor

@Ghislain89 Ghislain89 commented Jul 9, 2024

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

9 Skipped Deployments
Name Status Preview Comments Updated (UTC)
alpha-docs ⬜️ Ignored (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 8:47am
dev-wallet ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
explorer ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
explorer-mainnet ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
explorer-testnet ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
kode-ui ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
marmalade-marketplace ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
proof-of-us ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am
tools ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 8:47am

Copy link

changeset-bot bot commented Jul 9, 2024

⚠️ No Changeset found

Latest commit: 17bab3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Randynamic
Copy link
Contributor

@EnoF Can we merge this?

test('1 Initiator, 1 signers. all participants sign -> Should be able to mint the connection token @xs', async ({
initiator,
signer1,
}) => {
const webAuthNHelper = new WebAuthNHelper();
await webAuthNHelper.enableWebAuthN(initiator);
await webAuthNHelper.enableWebAuthN(signer1);
Copy link
Contributor Author

@Ghislain89 Ghislain89 Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Virtual Authenticators are enabled for a specific session, in this specific test you're essentially creating multiple virtual authenticators for various domains. On line 19 and 20, you're actually creating the virtual authenticators, but have not yet opened the proof-of-us app.

In the functions createSpireKeyAccountFor and signTransaction your recreating the virtual authenticator, which will likely result in being unable to sign, it would be a considerably security problem if you could just randomly create a virtual authenticator and sign with it.

What I would do to streamline this:

Remove creation of the virtual authenticator from createSpireKeyAccountFor and signTransaction, only do this once after navigating to the page with both the signer and initiator

  • Navigate to the TESTURL with both the initiator and signer.
  • Enable the virtual authenticator by calling enableWebAuthN for both the initiator and signer
  • With both the Initiator and the Signer, create a Spirekey Account
  • With the Initiator, create the proof
  • With the signer, open the shareURL
  • Start the signing process with the initiator
  • Sign with the signer
  • Sign with initiator
  • Epic win

Note: all the promise.all's are only needed if you want to scale up the amount of particpants, for the purpose of these tests (functional validation) I would skip that for now. If you get really stuck, I can create a fork on monday and help a friend out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue is that the popups for the new inline SDK need auhtenticators as well.

@sstraatemans sstraatemans self-requested a review July 29, 2024 08:50
@sstraatemans sstraatemans self-assigned this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants