payload-zitadel-plugin 0.2.31 → 0.2.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/README.md CHANGED
@@ -5,14 +5,14 @@
5
5
  plugin for [Payload CMS](https://payloadcms.com), which enables authentication via Zitadel IdP.
6
6
 
7
7
  The default use case is to fully replace PayloadCMS Auth with Zitadel.
8
- Thus the user collection in PayloadCMS becomes just a shadow of the information in Zitadel.
8
+ Thus, the user collection in PayloadCMS becomes just a shadow of the information in Zitadel.
9
9
 
10
10
  :boom: :boom: :boom:   works :100: with PayloadCMS version :three:   :boom: :boom: :boom:
11
11
 
12
12
  ## Install
13
13
 
14
14
  ```shell
15
- pnpm add payload-zitadel-plugin@0.2.31
15
+ pnpm add payload-zitadel-plugin@0.2.32
16
16
  ```
17
17
 
18
18
  ## Configuration
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,MAAM,eAAc;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,sBAkBnD,CAAA"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,MAAM,eAAc;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,sBAgBnD,CAAA"}
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import * as React from 'react';
3
3
  import { DefaultAccountIcon } from '@payloadcms/ui/graphics/Account/Default';
4
- import { usePayloadAPI } from '@payloadcms/ui';
4
+ import { useAuth } from '@payloadcms/ui';
5
5
  export const Avatar = ({ active })=>{
6
- const { data } = usePayloadAPI('/api/users/me')[0];
7
- const { user } = data;
6
+ const { user } = useAuth();
8
7
  return user?.image ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("style", null, 'zitadel-avatar:hover { filter: brightness(1.2); }'), /*#__PURE__*/ React.createElement("img", {
9
8
  className: "zitadel-avatar",
10
9
  src: user.image,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/Avatar.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport {DefaultAccountIcon} from '@payloadcms/ui/graphics/Account/Default'\nimport {usePayloadAPI} from '@payloadcms/ui'\nimport {ZitadelUser} from '../types.js'\n\nexport const Avatar = ({active}: { active: boolean }) => {\n\n const {data} = usePayloadAPI('/api/users/me')[0]\n\n const {user} = data as { user: ZitadelUser }\n\n return (\n user?.image ?\n <>\n <style>{'zitadel-avatar:hover { filter: brightness(1.2); }'}</style>\n <img className=\"zitadel-avatar\" src={user.image} height={25} width={25} alt=\"Profile Picture\" style={{\n borderRadius: '100%',\n ...(active ? {filter: 'brightness(.8)'} : {})\n }}/>\n </> :\n <DefaultAccountIcon active={active}/>\n )\n\n}\n"],"names":["React","DefaultAccountIcon","usePayloadAPI","Avatar","active","data","user","image","style","img","className","src","height","width","alt","borderRadius","filter"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAO;AAC9B,SAAQC,kBAAkB,QAAO,0CAAyC;AAC1E,SAAQC,aAAa,QAAO,iBAAgB;AAG5C,OAAO,MAAMC,SAAS,CAAC,EAACC,MAAM,EAAsB;IAEhD,MAAM,EAACC,IAAI,EAAC,GAAGH,cAAc,gBAAgB,CAAC,EAAE;IAEhD,MAAM,EAACI,IAAI,EAAC,GAAGD;IAEf,OACIC,MAAMC,sBACF,wDACI,oBAACC,eAAO,oEACR,oBAACC;QAAIC,WAAU;QAAiBC,KAAKL,KAAKC,KAAK;QAAEK,QAAQ;QAAIC,OAAO;QAAIC,KAAI;QAAkBN,OAAO;YACjGO,cAAc;YACd,GAAIX,SAAS;gBAACY,QAAQ;YAAgB,IAAI,CAAC,CAAC;QAChD;wBAEJ,oBAACf;QAAmBG,QAAQA;;AAGxC,EAAC"}
1
+ {"version":3,"sources":["../../src/components/Avatar.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport {DefaultAccountIcon} from '@payloadcms/ui/graphics/Account/Default'\nimport {useAuth} from '@payloadcms/ui'\nimport {ZitadelUser} from '../types.js'\n\nexport const Avatar = ({active}: { active: boolean }) => {\n\n const {user} = useAuth<ZitadelUser>()\n\n return (\n user?.image ?\n <>\n <style>{'zitadel-avatar:hover { filter: brightness(1.2); }'}</style>\n <img className=\"zitadel-avatar\" src={user.image} height={25} width={25} alt=\"Profile Picture\" style={{\n borderRadius: '100%',\n ...(active ? {filter: 'brightness(.8)'} : {})\n }}/>\n </> :\n <DefaultAccountIcon active={active}/>\n )\n\n}\n"],"names":["React","DefaultAccountIcon","useAuth","Avatar","active","user","image","style","img","className","src","height","width","alt","borderRadius","filter"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAO;AAC9B,SAAQC,kBAAkB,QAAO,0CAAyC;AAC1E,SAAQC,OAAO,QAAO,iBAAgB;AAGtC,OAAO,MAAMC,SAAS,CAAC,EAACC,MAAM,EAAsB;IAEhD,MAAM,EAACC,IAAI,EAAC,GAAGH;IAEf,OACIG,MAAMC,sBACF,wDACI,oBAACC,eAAO,oEACR,oBAACC;QAAIC,WAAU;QAAiBC,KAAKL,KAAKC,KAAK;QAAEK,QAAQ;QAAIC,OAAO;QAAIC,KAAI;QAAkBN,OAAO;YACjGO,cAAc;YACd,GAAIV,SAAS;gBAACW,QAAQ;YAAgB,IAAI,CAAC,CAAC;QAChD;wBAEJ,oBAACd;QAAmBG,QAAQA;;AAGxC,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-zitadel-plugin",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "plugin for Payload CMS, which enables authentication via Zitadel IdP",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,24 +36,24 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@payloadcms/next": "3.0.0-beta.109",
40
- "@payloadcms/translations": "3.0.0-beta.109",
41
- "@payloadcms/ui": "3.0.0-beta.109",
39
+ "@payloadcms/next": "3.0.0-beta.110",
40
+ "@payloadcms/translations": "3.0.0-beta.110",
41
+ "@payloadcms/ui": "3.0.0-beta.110",
42
42
  "jsonwebtoken": "^9.0.2",
43
- "next": "15.0.0-canary.171",
44
- "payload": "3.0.0-beta.109",
45
- "react": "19.0.0-rc-3edc000d-20240926",
46
- "react-dom": "19.0.0-rc-3edc000d-20240926"
43
+ "next": "15.0.0-canary.177",
44
+ "payload": "3.0.0-beta.110",
45
+ "react": "19.0.0-rc-0751fac7-20241002",
46
+ "react-dom": "19.0.0-rc-0751fac7-20241002"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@swc/cli": "^0.4.1-nightly.20240914",
50
- "@swc/core": "^1.7.28-nightly-20240924.1",
50
+ "@swc/core": "^1.7.30-nightly-20241002.1",
51
51
  "@types/jsonwebtoken": "^9.0.7",
52
52
  "@types/node": "^22.7.4",
53
- "@types/react": "^18.3.10",
53
+ "@types/react": "^18.3.11",
54
54
  "@types/react-dom": "^18.3.0",
55
55
  "rimraf": "^6.0.1",
56
- "typescript": "5.7.0-dev.20240927"
56
+ "typescript": "5.7.0-dev.20241003"
57
57
  },
58
58
  "engines": {
59
59
  "node": "^22.9.0"