rainbow-me / rainbowkit

The best way to connect a wallet 🌈 🧰
https://rainbowkit.com
MIT License
2.45k stars 666 forks source link

[bug] SIWE: Messages signed with CB Smart Wallet don't verify #2165

Open morleyzhi opened 2 months ago

morleyzhi commented 2 months ago

Is there an existing issue for this?

RainbowKit Version

2.1.5

wagmi Version

2.12.2

Current Behavior

Signing a message shows the error "Error verifying signature, please retry!"

Expected Behavior

Signing a message should sign you into the app

Steps To Reproduce

  1. Clone the repo
  2. Navigate to https://github.com/rainbow-me/rainbowkit/tree/main/examples/with-next-siwe-next-auth
  3. yarn and yarn dev
  4. Sign into CB Smart Wallet
  5. Connect using CBW
  6. Attempt to sign a message

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://github.com/rainbow-me/rainbowkit/tree/main/examples/with-next-siwe-next-auth

Anything else?

No response

morleyzhi commented 2 months ago

Following the advice in this article, I used a viem client to verify the SIWE message, which worked.