Skip to content

Commit 412434a

Browse files
authored
Merge pull request #771 from caveman-eth/main
chore: migrate to @signinwithethereum/siwe
2 parents 27a4506 + 8c502b2 commit 412434a

5 files changed

Lines changed: 28 additions & 59 deletions

File tree

apps/scan/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"resumable-stream": "^2.2.8",
127127
"server-only": "catalog:",
128128
"shiki": "^3.13.0",
129-
"siwe": "catalog:",
129+
"@signinwithethereum/siwe": "catalog:",
130130
"sonner": "^2.0.7",
131131
"streamdown": "^1.4.0",
132132
"stripe": "^20.1.2",

apps/scan/src/auth/providers/siwe/provider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SiweMessage } from 'siwe';
1+
import { SiweMessage } from '@signinwithethereum/siwe';
22
import Credentials, {
33
type CredentialsConfig,
44
} from 'next-auth/providers/credentials';
@@ -130,6 +130,7 @@ async function verifySignature({
130130
}) {
131131
const result = await siwe.verify({
132132
signature: credentials.signedMessage,
133+
domain: siwe.domain,
133134
nonce,
134135
});
135136
if (!result.success) {

apps/scan/src/auth/providers/siwe/sign-in.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SiweMessage } from 'siwe';
1+
import { SiweMessage } from '@signinwithethereum/siwe';
22
import { SIWE_PROVIDER_ID, SIWE_STATEMENT } from './constants';
33
import { getCsrfToken, signIn } from 'next-auth/react';
44

pnpm-lock.yaml

Lines changed: 23 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ catalog:
1818
tsx: ^4.21.0
1919
tsup: ^8.5.1
2020
viem: ^2.47.0
21-
siwe: ^3.0.0
21+
'@signinwithethereum/siwe': ^4.1.0
2222
vitest: ^4.0.16
2323
rimraf: ^5.0.5
2424

0 commit comments

Comments
 (0)