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

[Closing soon] Lit SDK is unable to regenerate the signature when the stored signature is expired #90

Closed
tonyfung99 opened this issue Apr 28, 2023 · 4 comments

Comments

@tonyfung99
Copy link

Describe the bug
Lit SDK cannot regenerate the signature when the stored signature is expired.
When the user contains an expired signature in local storage and calls LitJsSdk.checkAndSignAuthMessage, it is unable to regenerate a new signature and the following actions will be failed.

To Reproduce
Steps to reproduce the behavior:

  1. Calls LitJsSdk.checkAndSignAuthMessage with or without an expiration time (the expiration time is not working)
  2. Wait until the signature expired
  3. Calls LitJsSdk.checkAndSignAuthMessage again
  4. Errors occur

Expected behavior
The user should be prompted to sign again after the signature is expired.

Screenshots
Screenshot 2023-04-28 at 4 19 16 PM

Environment:

  • Lit SDK version: "@lit-protocol/lit-node-client-nodejs@2.1.114"
  • Framework: React

Additional info
In the function LitJsSdk.checkAndSignAuthMessage, the parameter expiration is ignored.

@Ansonhkg
Copy link
Collaborator

hey i think this is a bug, we will fix this asap!

@tonyfung99
Copy link
Author

hey i think this is a bug, we will fix this asap!

Taking a look into the code base as well, what's the difference between lit-siwe & siwe, why need to fork it?

@Ansonhkg
Copy link
Collaborator

Ansonhkg commented May 4, 2023

@tonyfung99
The original SIWE package includes the entire ethers project, which is quite large. This fork modifies the package to include only the necessary parts of ethers, significantly reducing its size.

@Ansonhkg
Copy link
Collaborator

Ansonhkg commented May 4, 2023

@tonyfung99

Hey just published!

Let me know if this version works for you 2.1.158

@Ansonhkg Ansonhkg changed the title Lit SDK is unable to regenerate the signature when the stored signature is expired [In Review] Lit SDK is unable to regenerate the signature when the stored signature is expired May 4, 2023
@Ansonhkg Ansonhkg changed the title [In Review] Lit SDK is unable to regenerate the signature when the stored signature is expired [Closing soon] Lit SDK is unable to regenerate the signature when the stored signature is expired May 8, 2023
@Ansonhkg Ansonhkg closed this as completed May 9, 2023
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

No branches or pull requests

2 participants