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

use eth blockhash as webauthn challenge #507

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

glitch003
Copy link
Collaborator

@glitch003 glitch003 commented Jun 13, 2024

This PR makes a few changes related to webauthn:

  • Use eth blockhash instead of chronicle, by default. This is really important, since we check for the last N blockhashes and chronicle creates a new block every time a txn is made. So it's possible for the blockhash to not be recent enough by the time the node sees the request. Instead, we use eth blockhashes, which are already available.
  • Remove nanoid. We don't need a package to generate a random string, it's really easy in vanilla JS. And the dynamic import causes problems.
  • Remove the concept of rpcUrl from the Lit Auth Client. It's only used to get the chronicle blockhash, and we don't need that anymore.
  • Make the blockhash fetcher use HTTPS. I had to do this to get my test to work in the browser, but we should do this anyway.

I've already pushed fixes to cayenne to look for the eth blockhash, so this should be working on cayenne. I will get it deployed to manzano asap too.

This should be fully working with the rc-v0.1-2024-04-23 branch of lit-assets, which is currently deployed to cayenne.

This is published as 6.0.2-beta.6

Copy link
Collaborator

@Ansonhkg Ansonhkg left a comment

Choose a reason for hiding this comment

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

Nice!

@joshLong145 joshLong145 merged commit e447700 into master Jun 13, 2024
4 checks passed
@joshLong145 joshLong145 deleted the fix/webauthn-challenge branch June 13, 2024 12:33
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