Skip to content

fix(sign-in-with-base-button): secure NextAuth SIWE verification#1547

Open
maho0638 wants to merge 1 commit into
base:masterfrom
maho0638:patch-8
Open

fix(sign-in-with-base-button): secure NextAuth SIWE verification#1547
maho0638 wants to merge 1 commit into
base:masterfrom
maho0638:patch-8

Conversation

@maho0638
Copy link
Copy Markdown

Security Fix

Addresses the cross-domain replay attack vulnerability in the SignInWithBaseButton NextAuth integration example.

Changes

  • Replaced import { verifyMessage } with import { verifySiweMessage } from 'viem/siwe'
  • Replaced verifyMessage call with verifySiweMessage.
  • Added domain and nonce validation parameters.
  • Added comment explaining production domain handling.

This ensures the NextAuth example follows security best practices for SIWE verification.

Replaced verifyMessage with verifySiweMessage in NextAuth example to prevent cross-domain replay attacks.
@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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.

2 participants