@shakibdshy/signet-auth-react 1.0.0-beta → 1.0.0-beta.3
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 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ state instead of each one calling the Go API on its own.
|
|
|
13
13
|
| Calls that backend from a frontend | Browser, Node.js | TypeScript, JavaScript | `@shakibdshy/signet-auth-client` |
|
|
14
14
|
| **Shares that Session with React components and guards routes** | Browser | TypeScript, React | **`@shakibdshy/signet-auth-react`** (this package) |
|
|
15
15
|
|
|
16
|
-
Current version: **`1.0.0-beta`**, a pre-1.0 release, so the API may still change before
|
|
17
|
-
`v1.0.0`. The Go module (`v1.0.0-beta`) and both npm packages (`1.0.0-beta`) are released
|
|
16
|
+
Current version: **`1.0.0-beta.2`**, a pre-1.0 release, so the API may still change before
|
|
17
|
+
`v1.0.0`. The Go module (`v1.0.0-beta.2`) and both npm packages (`1.0.0-beta.2`) are released
|
|
18
18
|
together at the same version.
|
|
19
19
|
|
|
20
20
|
> **This package does not implement authentication.** It is a thin layer over the typed
|
|
@@ -40,7 +40,7 @@ together at the same version.
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
npm install @shakibdshy/signet-auth-react@1.0.0-beta
|
|
43
|
+
npm install @shakibdshy/signet-auth-react@1.0.0-beta.2
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
This also installs `@shakibdshy/signet-auth-client`. Do not install the client separately.
|
|
@@ -170,7 +170,7 @@ the backend mounts Signet. It forwards the request's cookies and never creates a
|
|
|
170
170
|
| Field | What it is |
|
|
171
171
|
| --- | --- |
|
|
172
172
|
| `status` | `"loading"`, `"authenticated"` or `"anonymous"`. It starts as `"loading"` and changes when the first `GET /me` finishes. |
|
|
173
|
-
| `user` | The signed-in User returned by `GET /me`, or `null
|
|
173
|
+
| `user` | The signed-in User returned by `GET /me`, or `null` — with `email_verified`, `username` and the profile timestamps. |
|
|
174
174
|
| `error` | The `SignetApiError` from the last failed `GET /me`, or `null`. |
|
|
175
175
|
| `signIn(input)` | Calls the client's `signIn`, then reads the Session again. It throws the client's error if sign-in fails. |
|
|
176
176
|
| `signOut()` | Calls the client's `signOut`, then sets `status` to `"anonymous"`. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shakibdshy/signet-auth-react",
|
|
3
|
-
"version": "1.0.0-beta",
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "React session hooks (SignetProvider, useSession, sessionGuard) for Signet, an embeddable authentication library for Go",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@shakibdshy/signet-auth-client": "1.0.0-beta"
|
|
38
|
+
"@shakibdshy/signet-auth-client": "1.0.0-beta.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "5.9.3",
|