I also think it's unnecessary to copy/paste most of the documented functions as they could be provided out of the box by the W3M packages.
Describe the solution you'd like
I'd love to see a default (Next.js) SIWE implementation that can be referenced to reduce the amount of code/steps required to set up in my own codebase.
I think what's needed is and could be included in W3M:
allow to create a SIWEClientConfig (to configure the API routes)
allow to create a SIWEServerConfig (to configure iron-session, cookie name and password)
What problem does this new feature solve?
The documentation on SIWE is very limited and incomplete. i.e. it's unclear from just the docs on how to set up SIWE and lacks a proper step-by-step guide. https://docs.walletconnect.com/web3modal/nextjs/siwe/about
I also think it's unnecessary to copy/paste most of the documented functions as they could be provided out of the box by the W3M packages.
Describe the solution you'd like
I'd love to see a default (Next.js) SIWE implementation that can be referenced to reduce the amount of code/steps required to set up in my own codebase.
I think what's needed is and could be included in W3M:
The handlers should include a default implementation for the interface as described on https://docs.walletconnect.com/web3modal/nextjs/siwe/about#siwe-config-parameters
From an App perspective, you'd then only have to configure a client/server config and import the default W3M handler at a dynamic route (e.g. /api/siwe/[...route].ts) https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes
ConnectKit has a great example, and I would love to see something similar in W3M https://docs.family.co/connectkit/auth-with-nextjs#example