payload-zitadel-plugin 0.2.19 → 0.2.21
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 +3 -3
- package/dist/types.d.ts +0 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
@@ -12,7 +12,7 @@ Thus the user collection in PayloadCMS becomes just a shadow of the information
|
|
12
12
|
## Install
|
13
13
|
|
14
14
|
```shell
|
15
|
-
pnpm add payload-zitadel-plugin@0.2.
|
15
|
+
pnpm add payload-zitadel-plugin@0.2.21
|
16
16
|
```
|
17
17
|
|
18
18
|
## Configuration
|
@@ -84,7 +84,7 @@ ZITADEL_API_KEY='-----BEGIN RSA PRIVATE KEY----- ... ----END RSA PRIVATE KEY----
|
|
84
84
|
|
85
85
|
or use the Next.js Config file:
|
86
86
|
|
87
|
-
#### next.config.
|
87
|
+
#### next.config.js
|
88
88
|
|
89
89
|
```typescript
|
90
90
|
import {withPayload} from '@payloadcms/next/withPayload'
|
@@ -113,7 +113,7 @@ you have to manually add the asset URL to the Next.js config file.
|
|
113
113
|
Also if you want to automatically redirect to Zitadel without asking the user to click on the login button,
|
114
114
|
you have to add the redirect manually to the Next.js config file.
|
115
115
|
|
116
|
-
#### next.config.
|
116
|
+
#### next.config.js
|
117
117
|
|
118
118
|
```typescript
|
119
119
|
import {withPayload} from '@payloadcms/next/withPayload'
|
package/dist/types.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { AuthStrategy, Config, SanitizedConfig, ServerProps, TypedUser } from 'payload';
|
2
2
|
import { NextResponse } from 'next/server.js';
|
3
|
-
import { ClientConfigContext } from '@payloadcms/ui/providers/Config';
|
4
3
|
import { translations } from './translations.js';
|
5
4
|
import { I18nClient, NestedKeysStripped } from '@payloadcms/translations';
|
6
5
|
export type ZitadelPluginProps = Partial<{
|
@@ -39,9 +38,6 @@ export type ZitadelUser = TypedUser & Partial<{
|
|
39
38
|
name: string | null;
|
40
39
|
image: string | null;
|
41
40
|
}>;
|
42
|
-
export type ZitadelAvatarProps = ServerProps & {
|
43
|
-
user: ZitadelUser;
|
44
|
-
};
|
45
41
|
export type ZitadelLoginButtonProps = ServerProps & {
|
46
42
|
i18n: I18nClient<typeof translations.en, NestedKeysStripped<typeof translations.en>>;
|
47
43
|
authorizeURL: string;
|
@@ -59,7 +55,4 @@ export type PayloadConfigWithZitadel = (Config | SanitizedConfig) & {
|
|
59
55
|
};
|
60
56
|
};
|
61
57
|
};
|
62
|
-
export type PayloadConfigWithZitadelContext = ClientConfigContext & {
|
63
|
-
config: PayloadConfigWithZitadel;
|
64
|
-
};
|
65
58
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAC,MAAM,SAAS,CAAA;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,0BAA0B,CAAA;AAEvE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,aAAa,EAAE,IAAI,CAAA;IACnB,yBAAyB,EAAE,IAAI,CAAA;IAC/B,uBAAuB,EAAE,MAAM,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,gBAAgB,CAAA;CAC9B,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAElC,MAAM,MAAM,iBAAiB,GAAG,CAAC,K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AA;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,YAAY,CAAA;AAEvE,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,GAAG,eAAe,CAAC,GAAG;IAChE,KAAK,EAAE;QACH,MAAM,EAAE;YACJ,OAAO,EAAE;gBACL,SAAS,EAAE,MAAM,CAAA;gBACjB,QAAQ,EAAE,MAAM,CAAA;gBAChB,WAAW,EAAE,MAAM,CAAA;aACtB,CAAA;SACJ,CAAA;KACJ,CAAA;CACJ,CAAA"}
|
package/dist/types.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import {AuthStrategy,
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import {AuthStrategy, Config, SanitizedConfig, ServerProps, TypedUser} from 'payload'\nimport {NextResponse} from 'next/server.js'\nimport {translations} from './translations.js'\nimport {I18nClient, NestedKeysStripped} from '@payloadcms/translations'\n\nexport type ZitadelPluginProps = Partial<{\n disableAvatar: true\n disableDefaultLoginButton: true\n defaultLoginButtonTitle: string\n label: string\n onSuccess: ZitadelOnSuccess\n}> & Partial<ZitadelStrategyProps>\n\nexport type ZitadelPluginType = (props: ZitadelPluginProps) => (config: Config) => Config\n\nexport type ZitadelAPIProps = {\n enableAPI: true\n apiClientId: string,\n apiKeyId: string,\n apiKey: string\n}\n\nexport type ZitadelStrategyProps = {\n strategyName: string,\n issuerURL: string,\n clientId: string\n} & {\n authSlug: string,\n associatedIdFieldName: string,\n} & (ZitadelAPIProps | {\n enableAPI?: undefined\n} & Partial<ZitadelAPIProps>)\n\nexport type ZitadelStrategyType = (props: ZitadelStrategyProps) => AuthStrategy\n\nexport type ZitadelIdToken = Partial<{\n sub: string,\n name: string,\n email: string,\n picture: string\n}>\n\nexport type ZitadelUser = TypedUser & Partial<{\n email: string | null,\n name: string | null,\n image: string | null,\n}>\n\nexport type ZitadelLoginButtonProps = ServerProps & {\n i18n: I18nClient<typeof translations.en, NestedKeysStripped<typeof translations.en>>,\n authorizeURL: string,\n label: string\n}\n\nexport type ZitadelOnSuccess = (state: URLSearchParams) => NextResponse\n\nexport type PayloadConfigWithZitadel = (Config | SanitizedConfig) & {\n admin: {\n custom: {\n zitadel: {\n issuerURL: string\n clientId: string\n callbackURL: string\n }\n }\n }\n}"],"names":[],"mappings":"AAwDA,WAUC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "payload-zitadel-plugin",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.21",
|
4
4
|
"description": "plugin for Payload CMS, which enables authentication via Zitadel IdP",
|
5
5
|
"type": "module",
|
6
6
|
"license": "MIT",
|
@@ -36,27 +36,27 @@
|
|
36
36
|
"dist"
|
37
37
|
],
|
38
38
|
"dependencies": {
|
39
|
-
"@payloadcms/next": "3.0.0-beta.
|
40
|
-
"@payloadcms/translations": "3.0.0-beta.
|
41
|
-
"@payloadcms/ui": "3.0.0-beta.
|
39
|
+
"@payloadcms/next": "3.0.0-beta.96",
|
40
|
+
"@payloadcms/translations": "3.0.0-beta.96",
|
41
|
+
"@payloadcms/ui": "3.0.0-beta.96",
|
42
42
|
"jsonwebtoken": "^9.0.2",
|
43
|
-
"next": "15.0.0-canary.
|
44
|
-
"payload": "3.0.0-beta.
|
43
|
+
"next": "15.0.0-canary.134",
|
44
|
+
"payload": "3.0.0-beta.96",
|
45
45
|
"react": "rc",
|
46
46
|
"react-dom": "rc"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
49
|
"@swc/cli": "^0.4.0",
|
50
|
-
"@swc/core": "^1.7.
|
50
|
+
"@swc/core": "^1.7.21",
|
51
51
|
"@types/jsonwebtoken": "^9.0.6",
|
52
|
-
"@types/node": "^22.
|
53
|
-
"@types/react": "^18.3.
|
52
|
+
"@types/node": "^22.5.1",
|
53
|
+
"@types/react": "^18.3.4",
|
54
54
|
"@types/react-dom": "^18.3.0",
|
55
55
|
"rimraf": "^6.0.1",
|
56
|
-
"typescript": "^5.
|
56
|
+
"typescript": "^5.7.0-dev.20240829"
|
57
57
|
},
|
58
58
|
"engines": {
|
59
|
-
"node": "^22.
|
59
|
+
"node": "^22.7.0"
|
60
60
|
},
|
61
61
|
"exports": {
|
62
62
|
".": {
|