js: Error: Signer address does not match payload address
Hi, I am encountering a subjected error after signing in with a Safe (Multisig wallet).
Framework: Next.js 14
I’m using the ConnectWallet component to connect/sign in through the Safe wallet. It works fine with wallets other than Safe, but it only throws this subjected error after signing in from the Safe wallet accessed through safe.global."
Component to connect/sign wallet
<ConnectWallet
theme={'dark'}
/>
“app/api/auth/[…thirdweb]/route.ts”
export const { ThirdwebAuthHandler, getUser } = ThirdwebAuthAppRouter({
domain: "localhost:3008",
wallet: new PrivateKeyWallet(process.env.WALLET_KEY || ""),
callbacks: {
onLogin: async (userAddress) => {
return userAddress
},
onUser: async (userAddress) => {
return userAddress
},
}
});
export { ThirdwebAuthHandler as GET, ThirdwebAuthHandler as POST };
App wrapped
supportedChains={[Polygon,Sepolia]}
queryClient={queryClient}
activeChain={Polygon}
clientId="xxxxxxxxxxx"
supportedWallets={[
safeWallet({
personalWallets:[
metamaskWallet(),
]
}),
]}
authConfig={{
authUrl: "/api/auth",
domain:"http://localhost:3008/",
}}
>
{children}
</ThirdwebProvider>```
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
yep, all fixed!
Hi @davidicon Thanks for reporting this, I’m looking into this