@clivly/auth-clerk 0.7.2 → 0.7.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 +6 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
# @clivly/auth-clerk
|
|
2
2
|
|
|
3
|
-
Clerk implementation of Clivly's `ClivlyAuthAdapter`.
|
|
4
|
-
end-user from the host app's Clerk session and returns a Clivly-compatible user
|
|
5
|
-
shape.
|
|
3
|
+
[Clerk](https://clerk.com) implementation of Clivly's `ClivlyAuthAdapter`. Resolves a CRM end-user's identity from the host app's Clerk session.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
> **Preview-quality surface.** Install with `npm install @clivly/auth-clerk`.
|
|
6
|
+
> The email mapper and session resolution are unit-tested; broader host-app
|
|
7
|
+
> compatibility coverage is still growing.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
npm install @clivly/auth-clerk @clerk/backend
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
This adapter is a Tier 2 surface in
|
|
14
|
-
[STABILITY.md](https://github.com/amani-joseph/clivly.com/blob/master/STABILITY.md).
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
9
|
+
`@clerk/backend` is a peer dependency.
|
|
17
10
|
|
|
18
11
|
```ts
|
|
19
12
|
import { createClerkAuthAdapter } from "@clivly/auth-clerk";
|
|
@@ -21,17 +14,11 @@ import { createClerkAuthAdapter } from "@clivly/auth-clerk";
|
|
|
21
14
|
const authAdapter = createClerkAuthAdapter({
|
|
22
15
|
secretKey: process.env.CLERK_SECRET_KEY!,
|
|
23
16
|
publishableKey: process.env.CLERK_PUBLISHABLE_KEY,
|
|
24
|
-
// optional:
|
|
25
|
-
// authorizedParties: ["https://app.example.com"],
|
|
26
17
|
});
|
|
27
18
|
|
|
28
|
-
const user = await authAdapter.getUser(request);
|
|
29
|
-
// { id, email, name } | null
|
|
19
|
+
const user = await authAdapter.getUser(request); // { id, email, name } | null
|
|
30
20
|
```
|
|
31
21
|
|
|
32
|
-
Returns `null` when no Clerk session resolves, or when the resolved Clerk user
|
|
33
|
-
does not map to a Clivly user.
|
|
34
|
-
|
|
35
22
|
## License
|
|
36
23
|
|
|
37
24
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clivly/auth-clerk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Clerk implementation of Clivly's ClivlyAuthAdapter.",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@clivly/core": "0.7.
|
|
28
|
+
"@clivly/core": "0.7.3"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@clerk/backend": ">=1"
|