-
Notifications
You must be signed in to change notification settings - Fork 88
fix(auth): allow overriding siwe message fields #959
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
fix(auth): allow overriding siwe message fields #959
Conversation
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.
Pull Request Overview
This PR enhances the WalletClientAuthenticator.authenticate method to allow overriding specific SIWE (Sign-In with Ethereum) message fields while keeping nonce generation internal. The enhancement provides more flexibility for customizing authentication messages without exposing sensitive nonce generation logic.
- Added a new optional third parameter for SIWE message field overrides
- Introduced type safety with
WalletClientAuthenticateOverridestype - Restructured the message building logic to merge overrides with default parameters
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
glitch003
left a comment
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.
nice fix
WHAT
WalletClientAuthenticator.authenticateto accept partial SIWE overrides via an optional third argument. This keeps nonce generation internal while merging provided SIWE fields before signingpatchchangesetThis should fix the following error:
