-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: main
Are you sure you want to change the base?
WIP connect to sdk #2373
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 9 Skipped Deployments
|
|
cf88ad6
to
1ac2ccc
Compare
@EnoF Can we merge this? |
# Conflicts: # pnpm-lock.yaml
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); |
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 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.
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 issue is that the popups for the new inline SDK need auhtenticators as well.
https://app.asana.com/0/1206452987729603/1207666615570583/f