-
Notifications
You must be signed in to change notification settings - Fork 2
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
SIWW auth #724
SIWW auth #724
Conversation
Works as expected. Need to clean up the code and handle errors.
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for acre-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Move the Acre API requests to separate functions and set the Acre API endpoint via env variables.
We should delete session when the backend returns `address` field and that address is not equal to address returned by connector.
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.
Not tested yet, I left a few minor comments.
Pass the public key to create the session and update the flow when a user changes the account and connects wallet again - we should delete session (that was created for different account) and ask for a nonce to create a new session for updated bitcoin address.
Use the time util function to set the `expirationTime` in `SignInWithWalletMessage` constructor.
Use defined time values to create session expiration time.
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.
We decided to extend the expiration time of the valid session for the dapp to 7 days.
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.
This PR adds Sign-In With Wallet auth to the Acre dapp. When a user connects the wallet we create a session by sending a request to the Acre API backend. The session is valid for 3 hours.
SIWW flow: