jazz-browser-auth-clerk 0.8.30 → 0.8.32
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/CHANGELOG.md +20 -0
- package/README.md +20 -30
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# jazz-browser-media-images
|
2
2
|
|
3
|
+
## 0.8.32
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 1a4bda0: Document usage in readme
|
8
|
+
- Updated dependencies [df42b2b]
|
9
|
+
- Updated dependencies [df42b2b]
|
10
|
+
- cojson@0.8.32
|
11
|
+
- jazz-tools@0.8.32
|
12
|
+
- jazz-browser@0.8.32
|
13
|
+
|
14
|
+
## 0.8.31
|
15
|
+
|
16
|
+
### Patch Changes
|
17
|
+
|
18
|
+
- Updated dependencies [e511d6d]
|
19
|
+
- cojson@0.8.31
|
20
|
+
- jazz-browser@0.8.31
|
21
|
+
- jazz-tools@0.8.31
|
22
|
+
|
3
23
|
## 0.8.30
|
4
24
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
@@ -2,40 +2,30 @@
|
|
2
2
|
|
3
3
|
This package provides a [Clerk-based](https://clerk.com/) authentication strategy for Jazz.
|
4
4
|
|
5
|
+
Looking for a React integration? Check out [`jazz-react-auth-clerk`](https://www.npmjs.com/package/jazz-react-auth-clerk).
|
6
|
+
|
5
7
|
## Usage
|
6
8
|
|
7
|
-
`
|
9
|
+
`BrowserClerkAuth` is a class that provides a `JazzAuth` object. Provide a Clerk instance to `BrowserClerkAuth`, and it will return the appropriate `JazzAuth` object. Once authenticated, authentication will persist across page reloads, even if the device is offline.
|
8
10
|
|
9
11
|
|
10
12
|
From [the example chat app](https://github.com/gardencmp/jazz/tree/main/examples/chat-clerk):
|
11
13
|
|
12
|
-
```
|
13
|
-
import {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<Jazz.Provider
|
30
|
-
auth={auth}
|
31
|
-
peer="wss://cloud.jazz.tools/?key=chat-example-jazz-clerk@gcmp.io"
|
32
|
-
>
|
33
|
-
{children}
|
34
|
-
</Jazz.Provider>
|
35
|
-
) : (
|
36
|
-
<SignInButton />
|
37
|
-
)}
|
38
|
-
</>
|
39
|
-
);
|
40
|
-
}
|
14
|
+
```ts
|
15
|
+
import { BrowserClerkAuth } from "jazz-browser-auth-clerk";
|
16
|
+
|
17
|
+
// ...
|
18
|
+
|
19
|
+
const auth = new BrowserClerkAuth(
|
20
|
+
{
|
21
|
+
onError: (error) => {
|
22
|
+
void clerk.signOut();
|
23
|
+
setState((state) => ({
|
24
|
+
...state,
|
25
|
+
errors: [...state.errors, error.toString()],
|
26
|
+
}));
|
27
|
+
},
|
28
|
+
},
|
29
|
+
clerk,
|
30
|
+
);
|
41
31
|
```
|
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "jazz-browser-auth-clerk",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.32",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "src/index.ts",
|
7
7
|
"license": "MIT",
|
8
8
|
"dependencies": {
|
9
|
-
"cojson": "0.8.
|
10
|
-
"jazz-browser": "0.8.
|
11
|
-
"jazz-tools": "0.8.
|
9
|
+
"cojson": "0.8.32",
|
10
|
+
"jazz-browser": "0.8.32",
|
11
|
+
"jazz-tools": "0.8.32"
|
12
12
|
},
|
13
13
|
"devDependencies": {
|
14
14
|
"typescript": "^5.3.3"
|