@tuwaio/satellite-siwe-next-auth 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -8
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ A robust connector module for enabling secure Web3 authentication (Sign-In with
|
|
|
14
14
|
|
|
15
15
|
It replaces the complexity of traditional NextAuth setup by leveraging **Iron Session** for robust, encrypted, server-side session management, ensuring a seamless and fully decentralized authentication experience.
|
|
16
16
|
|
|
17
|
-
Built on top of
|
|
17
|
+
Built on top of **Wagmi/Viem** for signature generation.
|
|
18
18
|
|
|
19
19
|
-----
|
|
20
20
|
|
|
@@ -65,7 +65,7 @@ SIWE_SESSION_URL="http://localhost:3000"
|
|
|
65
65
|
|
|
66
66
|
## 🚀 Quick Start
|
|
67
67
|
|
|
68
|
-
### 1
|
|
68
|
+
### 1. Server Setup (API Route)
|
|
69
69
|
|
|
70
70
|
Create the dynamic API route file at **`src/api/siwe/[...siwe]/route.ts`** and export the handler from the package. This handles `/login`, `/logout`, and `/session` requests.
|
|
71
71
|
|
|
@@ -81,7 +81,7 @@ const siweApiHandler = createSiweApiHandler();
|
|
|
81
81
|
export const { GET, POST, DELETE } = siweApiHandler;
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
### 2
|
|
84
|
+
### 2. Client Setup (Provider)
|
|
85
85
|
|
|
86
86
|
Wrap your application in the `SiweNextAuthProvider`. This provider manages the authentication state, session fetching, and handles auto-sign-out/re-authentication on wallet changes.
|
|
87
87
|
|
|
@@ -109,7 +109,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
109
109
|
}
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
### 3
|
|
112
|
+
### 3. Usage (Login Component)
|
|
113
113
|
|
|
114
114
|
Use the `useSiweAuth` hook to access the sign-in function and state.
|
|
115
115
|
|
|
@@ -198,7 +198,3 @@ If you find this library useful, please consider supporting its development. Eve
|
|
|
198
198
|
## 📄 License
|
|
199
199
|
|
|
200
200
|
This project is licensed under the **Apache-2.0 License** - see the [LICENSE](./LICENSE) file for details.
|
|
201
|
-
|
|
202
|
-
## 👥 Contributors
|
|
203
|
-
|
|
204
|
-
- **Oleksandr Tkach** - [GitHub](https://github.com/Argeare5)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/satellite-siwe-next-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@wagmi/core": "2.x.x",
|
|
55
55
|
"siwe": "3.x.x",
|
|
56
|
-
"next": "
|
|
56
|
+
"next": "16.x.x",
|
|
57
57
|
"iron-session": "8.x.x",
|
|
58
58
|
"react": "19.x.x",
|
|
59
59
|
"viem": "2.x.x",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"@wagmi/core": "^2.22.1",
|
|
64
64
|
"@types/react": "^19.2.2",
|
|
65
65
|
"siwe": "^3.0.0",
|
|
66
|
-
"next": "
|
|
66
|
+
"next": "16.0.1",
|
|
67
67
|
"iron-session": "^8.0.4",
|
|
68
68
|
"react": "^19.2.0",
|
|
69
69
|
"tsup": "^8.5.0",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
|
-
"viem": "^2.38.
|
|
72
|
-
"wagmi": "^2.
|
|
71
|
+
"viem": "^2.38.5",
|
|
72
|
+
"wagmi": "^2.19.1"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"start": "tsup src/index.ts --watch",
|