@ackplus/nest-auth 1.1.37 → 1.1.39

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.
@@ -1 +1 @@
1
- {"version":3,"file":"admin-auth.controller.d.ts","sourceRoot":"","sources":["../../../../src/lib/admin-console/controllers/admin-auth.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/D,qBACa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,WAAW;IA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AAM,CAAS,GAAG,EAAE,cAAc;;;;;;;;;;;;IAkClC,KAAK,CAAS,GAAG,EAAE,aAAa,EAA8B,GAAG,EAAE,QAAQ;;;;;;;;;;;;IAa3E,MAAM,CAAiB,KAAK,EAAE,iBAAiB,EAA8B,GAAG,EAAE,QAAQ;;;IAkB1F,EAAE,CAAiB,KAAK,EAAE,iBAAiB;;;;;;;;;IAK3C,YAAY;;;IASZ,iBAAiB;;;;;;;;;;kBAuBa,MAAM;mBAAS,MAAM;;;IAmDnD,cAAc;;;;;;;;;;;;;IAkCd,UAAU;;;;;;;;;;;IAYV,WAAW,CAAS,GAAG,EAAE,uBAAuB;;;;;;;;;;;IAUhD,WAAW,CAAc,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,uBAAuB;;;;;;;;;;;IAUzE,WAAW,CAAc,EAAE,EAAE,MAAM;;;IASnC,aAAa,CAAS,GAAG,EAAE,qBAAqB;;;IAqCtD,OAAO,CAAC,WAAW;CAWpB"}
@@ -63,8 +63,6 @@ let AdminAuthController = class AdminAuthController {
63
63
  async signup(dto) {
64
64
  this.config.ensureEnabled();
65
65
  const secretKey = this.config.getSecretKey();
66
- console.log('secretKey', secretKey);
67
- console.log('dto.secretKey', dto.secretKey);
68
66
  if (!secretKey) {
69
67
  throw new common_1.BadRequestException({
70
68
  message: 'Admin console secret key is not configured. Please configure adminConsole.secretKey in AuthModuleOptions.',
@@ -1 +1 @@
1
- {"version":3,"file":"admin-auth.controller.js","sourceRoot":"","sources":["../../../../src/lib/admin-console/controllers/admin-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAawB;AAExB,uEAAkE;AAClE,6EAAwE;AACxE,2FAAqF;AACrF,gDAAiD;AACjD,kEAAkE;AAClE,kDAAmD;AACnD,uEAAkE;AAClE,mFAAqE;AACrE,qEAAkE;AAClE,kFAAqG;AACrG,uEAAkE;AAClE,6DAAwD;AACxD,mEAA+D;AAC/D,mEAA+D;AAC/D,yEAAqE;AACrE,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gBAAgB,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAM,0CAAqB;;wDAmCrD;8BAhSU,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,YAAY,CAAC;IAUpB,WAAA,IAAA,0BAAgB,EAAC,0BAAY,CAAC,CAAA;qCAPH,qCAAgB;QACjB,2CAAmB;QACrB,wDAAyB;QACrB,qCAAgB;QACf,0BAAW;QACX,0BAAW;QACT,8BAAa;QAEZ,oBAAU;GAVlC,mBAAmB,CA6S/B"}
1
+ {"version":3,"file":"admin-auth.controller.js","sourceRoot":"","sources":["../../../../src/lib/admin-console/controllers/admin-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAawB;AAExB,uEAAkE;AAClE,6EAAwE;AACxE,2FAAqF;AACrF,gDAAiD;AACjD,kEAAkE;AAClE,kDAAmD;AACnD,uEAAkE;AAClE,mFAAqE;AACrE,qEAAkE;AAClE,kFAAqG;AACrG,uEAAkE;AAClE,6DAAwD;AACxD,mEAA+D;AAC/D,mEAA+D;AAC/D,yEAAqE;AACrE,6CAAmD;AACnD,qCAAqC;AACrC,iEAA+D;AAC/D,qCAA0C;AAGnC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAEX;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IATnB,YACmB,SAA2B,EAC3B,QAA6B,EAC7B,MAAiC,EACjC,UAA4B,EAC5B,WAAwB,EACxB,WAAwB,EACxB,aAA4B,EAE5B,cAAwC;QARxC,cAAS,GAAT,SAAS,CAAkB;QAC3B,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,WAAM,GAAN,MAAM,CAA2B;QACjC,eAAU,GAAV,UAAU,CAAkB;QAC5B,gBAAW,GAAX,WAAW,CAAa;QACxB,gBAAW,GAAX,WAAW,CAAa;QACxB,kBAAa,GAAb,aAAa,CAAe;QAE5B,mBAAc,GAAd,cAAc,CAA0B;IACvD,CAAC;IAEG,gBAAgB;QACtB,MAAM,IAAI,GA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S,EAAC,uCAAiB,CAAC;;;;qDAS5B;AAIK;IAFL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACd,IAAA,kBAAS,EAAC,uCAAiB,CAAC;IACV,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAM,oDAAuB;;sDAMrD;AAIK;IAFL,IAAA,cAAK,EAAC,YAAY,CAAC;IACnB,IAAA,kBAAS,EAAC,uCAAiB,CAAC;IACV,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAM,oDAAuB;;sDAM9E;AAIK;IAFL,IAAA,eAAM,EAAC,YAAY,CAAC;IACpB,IAAA,kBAAS,EAAC,uCAAiB,CAAC;IACV,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;sDAM7B;AAGK;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAM,0CAAqB;;wDAmCrD;8BA9RU,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,YAAY,CAAC;IAUpB,WAAA,IAAA,0BAAgB,EAAC,0BAAY,CAAC,CAAA;qCAPH,qCAAgB;QACjB,2CAAmB;QACrB,wDAAyB;QACrB,qCAAgB;QACf,0BAAW;QACX,0BAAW;QACT,8BAAa;QAEZ,oBAAU;GAVlC,mBAAmB,CA2S/B"}
@@ -75,7 +75,7 @@ Error generating stack: `+i.message+`
75
75
  * LICENSE.md file in the root directory of this source tree.
76
76
  *
77
77
  * @license MIT
78
- */function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d4.apply(this,arguments)}function Mhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kje(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jje(e,t){return e.button===0&&(!t||t==="_self")&&!Kje(e)}const eFe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],tFe=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],nFe="6";try{window.__reactRouterVersion=nFe}catch{}const rFe=te.createContext({isTransitioning:!1}),aFe="startTransition",WJ=YMe[aFe];function iFe(e){let{basename:t,children:n,future:r,window:a}=e,i=te.useRef();i.current==null&&(i.current=cje({window:a,v5Compat:!0}));let o=i.current,[s,l]=te.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=te.useCallback(d=>{c&&WJ?WJ(()=>l(d)):l(d)},[l,c]);return te.useLayoutEffect(()=>o.listen(u),[o,u]),te.useEffect(()=>Gje(r),[r]),te.createElement(Xje,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const oFe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sFe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lFe=te.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=Mhe(t,eFe),{basename:p}=te.useContext(qf),m,h=!1;if(typeof c=="string"&&sFe.test(c)&&(m=c,oFe))try{let O=new URL(window.location.href),x=c.startsWith("//")?new URL(O.protocol+c):new URL(c),w=Bb(x.pathname,p);x.origin===O.origin&&w!=null?c=w+x.search+x.hash:h=!0}catch{}let g=Pje(c,{relative:a}),b=dFe(c,{replace:o,state:s,target:l,preventScrollReset:u,relative:a,viewTransition:d});function y(O){r&&r(O),O.defaultPrevented||b(O)}return te.createElement("a",d4({},f,{href:m||g,onClick:h||i?r:y,ref:n,target:l}))}),cFe=te.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,viewTransition:c,children:u}=t,d=Mhe(t,tFe),f=_6(l,{relative:d.relative}),p=mv(),m=te.useContext(Che),{navigator:h,basename:g}=te.useContext(qf),b=m!=null&&fFe(f)&&c===!0,y=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,O=p.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(O=O.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Bb(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let E=O===y||!o&&O.startsWith(y)&&O.charAt(w)==="/",_=x!=null&&(x===y||!o&&x.startsWith(y)&&x.charAt(y.length)==="/"),$={isActive:E,isPending:_,isTransitioning:b},I=E?r:void 0,D;typeof i=="function"?D=i($):D=[i,E?"active":null,_?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let L=typeof s=="function"?s($):s;return te.createElement(lFe,d4({},d,{"aria-current":I,className:D,ref:n,style:L,to:l,viewTransition:c}),typeof u=="function"?u($):u)});var u7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(u7||(u7={}));var ZJ;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ZJ||(ZJ={}));function uFe(e){let t=te.useContext(E6);return t||Kr(!1),t}function dFe(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,l=rU(),c=mv(),u=_6(e,{relative:o});return te.useCallback(d=>{if(Jje(d,n)){d.preventDefault();let f=r!==void 0?r:u4(c)===u4(u);l(e,{replace:f,state:a,preventScrollReset:i,relative:o,viewTransition:s})}},[c,l,u,r,a,n,e,i,o,s])}function fFe(e,t){t===void 0&&(t={});let n=te.useContext(rFe);n==null&&Kr(!1);let{basename:r}=uFe(u7.useViewTransitionState),a=_6(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Bb(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Bb(n.nextLocation.pathname,r)||n.nextLocation.pathname;return l7(a.pathname,o)!=null||l7(a.pathname,i)!=null}const tE=()=>{var i,o;const e=(i=window.__NEST_AUTH_CONFIG__)==null?void 0:i.basePath,t=(o=window.__NEST_AUTH_CONFIG__)==null?void 0:o.apiUrl;if(t)return t;const n="",r=window.location.origin,a=e??"/api/auth/admin";return console.log("envBaseUrl",n),console.log("basePath",a),`${r}${a}`};class pFe extends Error{constructor(t,n){super(t),this.status=n,this.name="ApiError"}}const cn={get basePath(){return tE()},async request(e,t={}){const r=`${this.basePath&&this.basePath!=="/"?this.basePath:""}${e}`,a={credentials:"include",...t};if(t.body){const l=t.headers;if(l instanceof Headers)Array.from(l.keys()).some(u=>u.toLowerCase()==="content-type")||l.set("Content-Type","application/json"),a.headers=l;else{const c={};if(l)for(const[d,f]of Object.entries(l))c[d]=f;Object.keys(c).some(d=>d.toLowerCase()==="content-type")||(c["Content-Type"]="application/json"),a.headers=c}}const i=await fetch(r,a),o=await i.text().catch(l=>(console.warn("Failed to read response text:",l,"Status:",i.status),""));let s={};if(o)try{s=JSON.parse(o)}catch(l){console.warn("Failed to parse JSON response:",l,"Status:",i.status,"Response text:",o.substring(0,200))}if(!i.ok){const l=(s==null?void 0:s.message)||(s==null?void 0:s.error)||`Request failed with status ${i.status}`;throw new pFe(l,i.status)}return s},get(e){return this.request(e)},post(e,t){return this.request(e,{method:"POST",body:JSON.stringify(t)})},patch(e,t){return this.request(e,{method:"PATCH",body:JSON.stringify(t)})},delete(e){return this.request(e,{method:"DELETE"})}},Lhe=te.createContext(null),mFe=({children:e})=>{const[t,n]=te.useState(!1),[r,a]=te.useState(null),i=te.useRef(),o=te.useCallback(c=>{if(t||i.current)return Promise.reject(new Error("A confirmation dialog is already open."));const u=typeof c=="string"?{message:c}:c;return a({title:u.title??"Confirm action",message:u.message,confirmText:u.confirmText??"Confirm",cancelText:u.cancelText??"Cancel"}),n(!0),new Promise(d=>{i.current=d})},[t]),s=te.useCallback(c=>{n(!1);const u=i.current;i.current=void 0,u&&u(c)},[]),l=te.useMemo(()=>o,[o]);return te.useEffect(()=>{if(!t)return;const c=u=>{u.key==="Escape"&&s(!1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[t,s]),T.jsxs(Lhe.Provider,{value:l,children:[e,t&&r&&T.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:()=>s(!1),children:[T.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50","aria-hidden":"true"}),T.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"relative bg-white rounded-xl shadow-2xl w-full max-w-md p-6",onClick:c=>c.stopPropagation(),children:[T.jsx("h3",{id:"confirm-title",className:"text-lg font-semibold text-gray-900 mb-2",children:r.title}),T.jsx("p",{className:"text-sm text-gray-700 mb-6",children:r.message}),T.jsxs("div",{className:"flex justify-end gap-3",children:[T.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>s(!1),children:r.cancelText}),T.jsx("button",{type:"button",className:"btn-primary",onClick:()=>s(!0),children:r.confirmText})]})]})]})]})},hv=()=>{const e=te.useContext(Lhe);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e};/**
78
+ */function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d4.apply(this,arguments)}function Mhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kje(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jje(e,t){return e.button===0&&(!t||t==="_self")&&!Kje(e)}const eFe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],tFe=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],nFe="6";try{window.__reactRouterVersion=nFe}catch{}const rFe=te.createContext({isTransitioning:!1}),aFe="startTransition",WJ=YMe[aFe];function iFe(e){let{basename:t,children:n,future:r,window:a}=e,i=te.useRef();i.current==null&&(i.current=cje({window:a,v5Compat:!0}));let o=i.current,[s,l]=te.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=te.useCallback(d=>{c&&WJ?WJ(()=>l(d)):l(d)},[l,c]);return te.useLayoutEffect(()=>o.listen(u),[o,u]),te.useEffect(()=>Gje(r),[r]),te.createElement(Xje,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const oFe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sFe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lFe=te.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=Mhe(t,eFe),{basename:p}=te.useContext(qf),m,h=!1;if(typeof c=="string"&&sFe.test(c)&&(m=c,oFe))try{let O=new URL(window.location.href),x=c.startsWith("//")?new URL(O.protocol+c):new URL(c),w=Bb(x.pathname,p);x.origin===O.origin&&w!=null?c=w+x.search+x.hash:h=!0}catch{}let g=Pje(c,{relative:a}),b=dFe(c,{replace:o,state:s,target:l,preventScrollReset:u,relative:a,viewTransition:d});function y(O){r&&r(O),O.defaultPrevented||b(O)}return te.createElement("a",d4({},f,{href:m||g,onClick:h||i?r:y,ref:n,target:l}))}),cFe=te.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,viewTransition:c,children:u}=t,d=Mhe(t,tFe),f=_6(l,{relative:d.relative}),p=mv(),m=te.useContext(Che),{navigator:h,basename:g}=te.useContext(qf),b=m!=null&&fFe(f)&&c===!0,y=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,O=p.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(O=O.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&g&&(x=Bb(x,g)||x);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let E=O===y||!o&&O.startsWith(y)&&O.charAt(w)==="/",_=x!=null&&(x===y||!o&&x.startsWith(y)&&x.charAt(y.length)==="/"),$={isActive:E,isPending:_,isTransitioning:b},I=E?r:void 0,D;typeof i=="function"?D=i($):D=[i,E?"active":null,_?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let L=typeof s=="function"?s($):s;return te.createElement(lFe,d4({},d,{"aria-current":I,className:D,ref:n,style:L,to:l,viewTransition:c}),typeof u=="function"?u($):u)});var u7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(u7||(u7={}));var ZJ;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ZJ||(ZJ={}));function uFe(e){let t=te.useContext(E6);return t||Kr(!1),t}function dFe(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,l=rU(),c=mv(),u=_6(e,{relative:o});return te.useCallback(d=>{if(Jje(d,n)){d.preventDefault();let f=r!==void 0?r:u4(c)===u4(u);l(e,{replace:f,state:a,preventScrollReset:i,relative:o,viewTransition:s})}},[c,l,u,r,a,n,e,i,o,s])}function fFe(e,t){t===void 0&&(t={});let n=te.useContext(rFe);n==null&&Kr(!1);let{basename:r}=uFe(u7.useViewTransitionState),a=_6(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Bb(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Bb(n.nextLocation.pathname,r)||n.nextLocation.pathname;return l7(a.pathname,o)!=null||l7(a.pathname,i)!=null}const tE=()=>{var a,i;const e=(a=window.__NEST_AUTH_CONFIG__)==null?void 0:a.basePath,t=(i=window.__NEST_AUTH_CONFIG__)==null?void 0:i.apiUrl;return t||`${window.location.origin}${e??"/api/auth/admin"}`};class pFe extends Error{constructor(t,n){super(t),this.status=n,this.name="ApiError"}}const cn={get basePath(){return tE()},async request(e,t={}){const r=`${this.basePath&&this.basePath!=="/"?this.basePath:""}${e}`,a={credentials:"include",...t};if(t.body){const l=t.headers;if(l instanceof Headers)Array.from(l.keys()).some(u=>u.toLowerCase()==="content-type")||l.set("Content-Type","application/json"),a.headers=l;else{const c={};if(l)for(const[d,f]of Object.entries(l))c[d]=f;Object.keys(c).some(d=>d.toLowerCase()==="content-type")||(c["Content-Type"]="application/json"),a.headers=c}}const i=await fetch(r,a),o=await i.text().catch(l=>(console.warn("Failed to read response text:",l,"Status:",i.status),""));let s={};if(o)try{s=JSON.parse(o)}catch(l){console.warn("Failed to parse JSON response:",l,"Status:",i.status,"Response text:",o.substring(0,200))}if(!i.ok){const l=(s==null?void 0:s.message)||(s==null?void 0:s.error)||`Request failed with status ${i.status}`;throw new pFe(l,i.status)}return s},get(e){return this.request(e)},post(e,t){return this.request(e,{method:"POST",body:JSON.stringify(t)})},patch(e,t){return this.request(e,{method:"PATCH",body:JSON.stringify(t)})},delete(e){return this.request(e,{method:"DELETE"})}},Lhe=te.createContext(null),mFe=({children:e})=>{const[t,n]=te.useState(!1),[r,a]=te.useState(null),i=te.useRef(),o=te.useCallback(c=>{if(t||i.current)return Promise.reject(new Error("A confirmation dialog is already open."));const u=typeof c=="string"?{message:c}:c;return a({title:u.title??"Confirm action",message:u.message,confirmText:u.confirmText??"Confirm",cancelText:u.cancelText??"Cancel"}),n(!0),new Promise(d=>{i.current=d})},[t]),s=te.useCallback(c=>{n(!1);const u=i.current;i.current=void 0,u&&u(c)},[]),l=te.useMemo(()=>o,[o]);return te.useEffect(()=>{if(!t)return;const c=u=>{u.key==="Escape"&&s(!1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[t,s]),T.jsxs(Lhe.Provider,{value:l,children:[e,t&&r&&T.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:()=>s(!1),children:[T.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50","aria-hidden":"true"}),T.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"relative bg-white rounded-xl shadow-2xl w-full max-w-md p-6",onClick:c=>c.stopPropagation(),children:[T.jsx("h3",{id:"confirm-title",className:"text-lg font-semibold text-gray-900 mb-2",children:r.title}),T.jsx("p",{className:"text-sm text-gray-700 mb-6",children:r.message}),T.jsxs("div",{className:"flex justify-end gap-3",children:[T.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>s(!1),children:r.cancelText}),T.jsx("button",{type:"button",className:"btn-primary",onClick:()=>s(!0),children:r.confirmText})]})]})]})]})},hv=()=>{const e=te.useContext(Lhe);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e};/**
79
79
  * @license lucide-react v0.294.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
@@ -5212,7 +5212,7 @@ export class OnboardingService {
5212
5212
  - Header mode (default): Returns new tokens in response body
5213
5213
  - Cookie mode: Sets new tokens in HTTP-only cookies and returns success message`,operationId:"AuthController_refreshToken",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthRefreshTokenRequestDto"}}}},responses:{200:{description:"Header mode: Returns message + tokens in body",content:{"application/json":{schema:{$ref:"#/components/schemas/AuthWithTokensResponseDto"}}}}},summary:"Refresh Token",tags:["Auth"]}},"/auth/mfa/challenge":{post:{operationId:"MfaController_challenge",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthSendMfaCodeRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaCodeSentResponseDto"}}}}},summary:"Send MFA code for setup/verification",tags:["Mfa"]}},"/auth/mfa/verify":{post:{description:`Verify multi-factor authentication. Response format depends on accessTokenType configuration:
5214
5214
  - Header mode (default): Returns tokens in response body
5215
- - Cookie mode: Sets tokens in HTTP-only cookies and returns success message`,operationId:"AuthController_verify2fa",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerify2faRequestDto"}}}},responses:{200:{description:"Header mode: Returns message + tokens in body",content:{"application/json":{schema:{$ref:"#/components/schemas/Verify2faWithTokensResponseDto"}}}}},summary:"Verify MFA",tags:["Auth"]}},"/auth/logout":{post:{operationId:"AuthController_logout",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthLogoutResponseDto"}}}}},summary:"Logout",tags:["Auth"]}},"/auth/logout-all":{post:{operationId:"AuthController_logoutAll",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthLogoutAllResponseDto"}}}}},summary:"Logout All",tags:["Auth"]}},"/auth/change-password":{post:{operationId:"AuthController_changePassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthChangePasswordRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/AuthWithTokensResponseDto"}}}}},summary:"Change Password",tags:["Auth"]}},"/auth/forgot-password":{post:{operationId:"AuthController_forgotPassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthForgotPasswordRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthPasswordResetLinkSentResponseDto"}}}}},summary:"Forgot password",tags:["Auth"]}},"/auth/verify-forgot-password-otp":{post:{operationId:"AuthController_verifyForgotPasswordOtp",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyForgotPasswordOtpRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/VerifyOtpResponseDto"}}}}},summary:"Verify Forgot Password OTP and get reset token",tags:["Auth"]}},"/auth/reset-password":{post:{operationId:"AuthController_resetPassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthResetPasswordWithTokenRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthPasswordResetResponseDto"}}}}},summary:"Reset password",tags:["Auth"]}},"/auth/user":{get:{operationId:"AuthController_getUser",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/UserResponseDto"}}}}},summary:"Get Logged In User",tags:["Auth"]}},"/auth/verify-session":{get:{description:"Lightweight endpoint to verify if the current session is valid. Returns minimal information without fetching full user data.",operationId:"AuthController_verifySession",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{properties:{valid:{type:"boolean",example:!0},userId:{type:"string",example:"123e4567-e89b-12d3-a456-426614174000"},expiresAt:{type:"string",example:"2024-01-01T12:00:00.000Z"}}}}}}},summary:"Verify Session",tags:["Auth"]}},"/auth/send-email-verification":{post:{operationId:"AuthController_sendEmailVerification",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthSendEmailVerificationRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthEmailVerificationSentResponseDto"}}}}},summary:"Send email verification",tags:["Auth"]}},"/auth/verify-email":{post:{operationId:"AuthController_verifyEmail",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyEmailRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthEmailVerifiedResponseDto"}}}}},summary:"Verify Email",tags:["Auth"]}},"/auth/callback/{provider}":{get:{description:"OAuth callback endpoint for SSO providers. Exchanges authorization code for access token and returns raw SSO user info. Returns HTML page that posts SSO data to parent window and auto-closes.",operationId:"AuthController_ssoCallback",parameters:[{name:"provider",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},summary:"SSO Callback",tags:["Auth"]}},"/auth/mfa/status":{get:{operationId:"MfaController_getStatus",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/MfaStatusResponseDto"}}}}},summary:"Get MFA status for the current user",tags:["Mfa"]}},"/auth/mfa/toggle":{post:{operationId:"MfaController_toggleMfa",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthToggleMfaRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaToggleResponseDto"}}}}},summary:"Enable or disable MFA for the current user",tags:["Mfa"]}},"/auth/mfa/devices":{get:{operationId:"MfaController_listDevices",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/MfaDeviceDto"}}}}}},summary:"List registered MFA devices",tags:["Mfa"]}},"/auth/mfa/devices/{deviceId}":{delete:{operationId:"MfaController_removeDevice",parameters:[{name:"deviceId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaDeviceRemovedResponseDto"}}}}},summary:"Remove a registered MFA device",tags:["Mfa"]}},"/auth/mfa/setup-totp":{post:{operationId:"MfaController_setupTotp",parameters:[],responses:{200:{description:""}},summary:"Setup TOTP Device",tags:["Mfa"]}},"/auth/mfa/verify-totp-setup":{post:{operationId:"MfaController_verifyTotpSetup",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyTotpSetupRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaDeviceVerifiedResponseDto"}}}}},summary:"Verify TOTP Setup",tags:["Mfa"]}},"/auth/mfa/generate-recovery-code":{post:{operationId:"MfaController_generateRecoveryCodes",parameters:[],responses:{200:{description:""}},summary:"Generate Recovery Codes",tags:["Mfa"]}},"/auth/mfa/reset-totp":{post:{operationId:"MfaController_resetTotp",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaResetResponseDto"}}}}},summary:"Reset TOTP Device",tags:["Mfa"]}}},uSt={title:"@ackplus/nest-auth API",description:"OpenAPI specification generated from the Nest Auth module",version:"1.1.37",contact:{}},dSt=[],fSt=[],pSt={securitySchemes:{bearer:{scheme:"bearer",bearerFormat:"JWT",type:"http"}},schemas:{NestAuthSignupRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"},guard:{type:"string",description:"Guard context (e.g. admin, web, vendor) for isolation. Deprecated: use client",example:"admin",deprecated:!0}},required:["password"]},UserResponseDto:{type:"object",properties:{id:{type:"string",description:"User unique identifier",example:"123e4567-e89b-12d3-a456-426614174000"},email:{type:"string",description:"User email address",example:"user@example.com"},phone:{type:"string",description:"User phone number",example:"+1234567890"},isVerified:{type:"boolean",description:"Email verification status",example:!0},isMfaEnabled:{type:"boolean",description:"Whether MFA is enabled for this user",example:!1},roles:{description:"User roles (role names)",example:["admin","user"],type:"array",items:{type:"string"}},permissions:{description:"User permissions (flattened from roles)",example:["read:users","write:users"],type:"array",items:{type:"string"}},metadata:{type:"object",description:"Additional user metadata",example:{firstName:"John",lastName:"Doe"}},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"tenant-123"}},required:["id","isVerified"]},AuthWithTokensResponseDto:{type:"object",properties:{accessToken:{type:"string",description:"JWT access token (short-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJpYXQiOjE2OTk5OTk5OTksImV4cCI6MTY5OTk5OTk5OX0.xyz"},refreshToken:{type:"string",description:"JWT refresh token (long-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY5OTk5OTk5OX0.abc"},message:{type:"string",description:"Success message (added by controller based on configuration)",example:"Login successful"},isRequiresMfa:{type:"boolean",description:"Whether multi-factor authentication is required",example:!1},mfaMethods:{type:"array",description:"Available MFA methods when isRequiresMfa is true",example:["email","totp"],items:{type:"string",enum:["email","sms","totp"]}},defaultMfaMethod:{type:"string",description:"Default/recommended MFA method",example:"email",enum:["email","sms","totp"]},user:{description:"User information",allOf:[{$ref:"#/components/schemas/UserResponseDto"}]}},required:["accessToken","refreshToken","isRequiresMfa"]},EmailCredentialsDto:{type:"object",properties:{email:{type:"string",description:"User email address",example:"user@example.com"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8}},required:["email","password"]},PhoneCredentialsDto:{type:"object",properties:{phone:{type:"string",description:"User phone number",example:"+1234567890"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8}},required:["phone","password"]},SocialCredentialsDto:{type:"object",properties:{token:{type:"string",description:"OAuth token or ID token from social provider",example:"ya29.a0AfH6SMBx1234567890abcdefghijklmnop"}},required:["token"]},NestAuthLoginRequestDto:{type:"object",properties:{providerName:{type:"string",description:"Authentication provider name",example:"email",enum:["email","phone","google","facebook","apple","github"],default:"email"},credentials:{description:"Login credentials - type varies by provider",examples:{emailLogin:{summary:"Email Login",value:{email:"user@example.com",password:"SecurePass123!"}},phoneLogin:{summary:"Phone Login",value:{phone:"+1234567890",password:"SecurePass123!"}},socialLogin:{summary:"Social Login (Google/Facebook/etc)",value:{token:"ya29.a0AfH6SMBx...",type:"idToken"}}},oneOf:[{$ref:"#/components/schemas/EmailCredentialsDto"},{$ref:"#/components/schemas/PhoneCredentialsDto"},{$ref:"#/components/schemas/SocialCredentialsDto"}]},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"},guard:{type:"string",description:"Guard context (e.g. admin, web, vendor) for isolation. Deprecated: use client",example:"admin",deprecated:!0},createUserIfNotExists:{type:"boolean",description:"Auto-create user if not exists (for social auth)",default:!1}},required:["credentials"]},NestAuthRefreshTokenRequestDto:{type:"object",properties:{refreshToken:{type:"string",description:"Refresh token to obtain new access token",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCJ9.abc123"}},required:["refreshToken"]},NestAuthMfaCodeSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA code sent successfully"}},required:["message"]},NestAuthMFAMethodEnum:{type:"string",enum:["email","sms","totp"]},NestAuthVerify2faRequestDto:{type:"object",properties:{method:{description:"MFA method used",example:"totp",allOf:[{$ref:"#/components/schemas/NestAuthMFAMethodEnum"}]},otp:{type:"string",description:"One-time password code",example:"123456",minLength:6,maxLength:8},rememberDevice:{type:"boolean",description:"Whether to trust this device for future logins",example:!0}},required:["method","otp"]},Verify2faWithTokensResponseDto:{type:"object",properties:{accessToken:{type:"string",description:"JWT access token (short-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJpYXQiOjE2OTk5OTk5OTksImV4cCI6MTY5OTk5OTk5OX0.xyz"},refreshToken:{type:"string",description:"JWT refresh token (long-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY5OTk5OTk5OX0.abc"},message:{type:"string",description:"Verification success message (added by controller)",example:"2FA verification successful"}},required:["accessToken","refreshToken"]},NestAuthLogoutResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Logged out successfully"}},required:["message"]},NestAuthLogoutAllResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Logged out from all devices"}},required:["message"]},NestAuthChangePasswordRequestDto:{type:"object",properties:{currentPassword:{type:"string",description:"Current password",example:"DemoOwner1!",minLength:8},newPassword:{type:"string",description:"New password",example:"DemoOwner1!New",minLength:8}},required:["currentPassword","newPassword"]},NestAuthForgotPasswordRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}}},NestAuthPasswordResetLinkSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"If your email is registered, you will receive a password reset link"}},required:["message"]},NestAuthVerifyForgotPasswordOtpRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},otp:{type:"string",description:"One-time password code received via email or SMS",example:"123456",minLength:6,maxLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}},required:["otp"]},VerifyOtpResponseDto:{type:"object",properties:{message:{type:"string",description:"Success message"},resetToken:{type:"string",description:"Password reset token - use this to reset password"}},required:["message"]},NestAuthResetPasswordWithTokenRequestDto:{type:"object",properties:{token:{type:"string",description:"Password reset token (JWT) received after OTP verification",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz"},newPassword:{type:"string",description:"New password",example:"NewSecurePass123!",minLength:8}},required:["token","newPassword"]},NestAuthPasswordResetResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Password has been reset successfully"}},required:["message"]},NestAuthSendEmailVerificationRequestDto:{type:"object",properties:{tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}}},NestAuthEmailVerificationSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Verification email sent"}},required:["message"]},NestAuthVerifyEmailRequestDto:{type:"object",properties:{otp:{type:"string",description:"One-time password code received via email",example:"123456",minLength:6,maxLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}},required:["otp"]},NestAuthEmailVerifiedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Email verified successfully"}},required:["message"]},MfaDeviceDto:{type:"object",properties:{id:{type:"string",description:"Unique identifier of the MFA device",example:"4b3c9c9c-9a9d-4d1e-8d9f-123456789abc"},deviceName:{type:"string",description:"Friendly name of the registered device",example:"Work laptop"},method:{type:"string",description:"MFA method this device supports",enum:["email","sms","totp"],example:"totp"},lastUsedAt:{format:"date-time",type:"string",description:"Timestamp of when the device was last used",example:"2024-05-20T12:34:56.000Z"},verified:{type:"boolean",description:"Whether the device setup has been verified",example:!0},createdAt:{format:"date-time",type:"string",description:"Timestamp of when the device was registered",example:"2024-05-18T10:15:00.000Z"}},required:["id","deviceName","method","verified"]},MfaStatusResponseDto:{type:"object",properties:{isEnabled:{type:"boolean",description:"Whether MFA is currently enabled for the user",example:!0},verifiedMethods:{type:"array",description:"MFA methods the user has verified and can currently use (includes EMAIL/SMS if configured, and TOTP if user has verified device)",example:["email","totp"],items:{type:"string",enum:["email","sms","totp"]}},configuredMethods:{type:"array",description:"All MFA methods configured and available in the application (methods user can potentially set up)",example:["email","totp","sms"],items:{type:"string",enum:["email","sms","totp"]}},allowUserToggle:{type:"boolean",description:"Indicates if MFA toggling is allowed for the user",example:!0},allowMethodSelection:{type:"boolean",description:"Indicates if users can choose their preferred MFA method",example:!0},totpDevices:{description:"Registered TOTP devices for the user",type:"array",items:{$ref:"#/components/schemas/MfaDeviceDto"}},hasRecoveryCode:{type:"boolean",description:"Whether a recovery code has been generated for the user",example:!1}},required:["isEnabled","verifiedMethods","configuredMethods","allowUserToggle","allowMethodSelection","totpDevices","hasRecoveryCode"]},NestAuthToggleMfaRequestDto:{type:"object",properties:{enabled:{type:"boolean",description:"Whether MFA should be enabled for the current user",example:!0}},required:["enabled"]},NestAuthMfaToggleResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA enabled successfully"}},required:["message"]},NestAuthMfaDeviceRemovedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Device removed successfully"}},required:["message"]},NestAuthSendMfaCodeRequestDto:{type:"object",properties:{method:{description:"MFA delivery method",example:"email",examples:{email:{value:"email",description:"Send OTP via email"},sms:{value:"sms",description:"Send OTP via SMS"},totp:{value:"totp",description:"Use authenticator app (TOTP)"}},allOf:[{$ref:"#/components/schemas/NestAuthMFAMethodEnum"}]}},required:["method"]},NestAuthVerifyTotpSetupRequestDto:{type:"object",properties:{otp:{type:"string",description:"The TOTP code from authenticator app",example:"123456",minLength:6,maxLength:6},secret:{type:"string",description:"Secret key from TOTP setup",example:"JBSWY3DPEHPK3PXP"}},required:["otp","secret"]},NestAuthMfaDeviceVerifiedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Device setup successfully"}},required:["message"]},NestAuthMfaResetResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA reset successfully"}},required:["message"]}}},mSt={openapi:lSt,paths:cSt,info:uSt,tags:dSt,servers:fSt,components:pSt},B2=({content:e})=>T.jsx(Cyt,{remarkPlugins:[MC],components:{code({node:t,inline:n,className:r,children:a,...i}){const o=/language-(\w+)/.exec(r||"");return!n&&o?T.jsx(Ive,{...i,style:nSt,language:o[1],PreTag:"div",customStyle:{margin:0,borderRadius:"0.5rem",fontSize:"0.875rem"},children:String(a).replace(/\n$/,"")}):T.jsx("code",{...i,className:`${r} bg-gray-100 text-gray-800 rounded px-1 py-0.5 text-sm font-mono`,children:a})},table({children:t}){return T.jsx("div",{className:"overflow-x-auto my-4 border border-gray-200 rounded-lg",children:T.jsx("table",{className:"min-w-full divide-y divide-gray-200",children:t})})},thead({children:t}){return T.jsx("thead",{className:"bg-gray-50",children:t})},th({children:t}){return T.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:t})},td({children:t}){return T.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 border-t border-gray-200",children:t})},a({href:t,children:n}){return T.jsx("a",{href:t,className:"text-primary-600 hover:text-primary-800 hover:underline",target:"_blank",rel:"noopener noreferrer",children:n})},h2({children:t}){return T.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-8 mb-4 pb-2 border-b border-gray-200",children:t})},h3({children:t}){return T.jsx("h3",{className:"text-xl font-semibold text-gray-900 mt-6 mb-3",children:t})},p({children:t}){return T.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:t})},ul({children:t}){return T.jsx("ul",{className:"list-disc list-inside space-y-1 mb-4 text-gray-700",children:t})},li({children:t}){return T.jsx("li",{className:"ml-4",children:t})},blockquote({children:t}){return T.jsx("blockquote",{className:"border-l-4 border-primary-500 pl-4 py-1 my-4 bg-primary-50 text-gray-700 italic rounded-r",children:t})}},children:e}),hSt=()=>{const[e,t]=te.useState(!1),[n,r]=te.useState(null),[a,i]=te.useState("api");te.useEffect(()=>{const l=mSt||{};!l||!l.paths||Object.keys(l.paths||{}).length===0?t(!0):r(l)},[]);const o=()=>{if(!n)return;const l=JSON.stringify(n,null,2),c=new Blob([l],{type:"application/json"}),u=URL.createObjectURL(c),d=document.createElement("a");d.href=u,d.download="nest-auth-api.json",document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(u)},s=[{id:"api",label:"API Explorer",icon:d7},{id:"config",label:"Configuration",icon:TFe},{id:"examples",label:"Examples",icon:YJ},{id:"events",label:"Events",icon:NFe},{id:"api-reference",label:"API Reference",icon:bFe},{id:"services",label:"Services",icon:YJ}];return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Iv,{title:"API Documentation",description:"Comprehensive guide and interactive API documentation.",action:a==="api"&&T.jsxs("button",{onClick:o,className:"btn-secondary flex items-center gap-2",disabled:e,children:[T.jsx(wFe,{className:"w-4 h-4"}),"Download JSON"]})}),T.jsx("div",{className:"border-b border-gray-200",children:T.jsx("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:s.map(l=>{const c=l.icon;return T.jsxs("button",{onClick:()=>i(l.id),className:`
5215
+ - Cookie mode: Sets tokens in HTTP-only cookies and returns success message`,operationId:"AuthController_verify2fa",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerify2faRequestDto"}}}},responses:{200:{description:"Header mode: Returns message + tokens in body",content:{"application/json":{schema:{$ref:"#/components/schemas/Verify2faWithTokensResponseDto"}}}}},summary:"Verify MFA",tags:["Auth"]}},"/auth/logout":{post:{operationId:"AuthController_logout",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthLogoutResponseDto"}}}}},summary:"Logout",tags:["Auth"]}},"/auth/logout-all":{post:{operationId:"AuthController_logoutAll",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthLogoutAllResponseDto"}}}}},summary:"Logout All",tags:["Auth"]}},"/auth/change-password":{post:{operationId:"AuthController_changePassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthChangePasswordRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/AuthWithTokensResponseDto"}}}}},summary:"Change Password",tags:["Auth"]}},"/auth/forgot-password":{post:{operationId:"AuthController_forgotPassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthForgotPasswordRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthPasswordResetLinkSentResponseDto"}}}}},summary:"Forgot password",tags:["Auth"]}},"/auth/verify-forgot-password-otp":{post:{operationId:"AuthController_verifyForgotPasswordOtp",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyForgotPasswordOtpRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/VerifyOtpResponseDto"}}}}},summary:"Verify Forgot Password OTP and get reset token",tags:["Auth"]}},"/auth/reset-password":{post:{operationId:"AuthController_resetPassword",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthResetPasswordWithTokenRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthPasswordResetResponseDto"}}}}},summary:"Reset password",tags:["Auth"]}},"/auth/user":{get:{operationId:"AuthController_getUser",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/UserResponseDto"}}}}},summary:"Get Logged In User",tags:["Auth"]}},"/auth/verify-session":{get:{description:"Lightweight endpoint to verify if the current session is valid. Returns minimal information without fetching full user data.",operationId:"AuthController_verifySession",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{properties:{valid:{type:"boolean",example:!0},userId:{type:"string",example:"123e4567-e89b-12d3-a456-426614174000"},expiresAt:{type:"string",example:"2024-01-01T12:00:00.000Z"}}}}}}},summary:"Verify Session",tags:["Auth"]}},"/auth/send-email-verification":{post:{operationId:"AuthController_sendEmailVerification",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthSendEmailVerificationRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthEmailVerificationSentResponseDto"}}}}},summary:"Send email verification",tags:["Auth"]}},"/auth/verify-email":{post:{operationId:"AuthController_verifyEmail",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyEmailRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthEmailVerifiedResponseDto"}}}}},summary:"Verify Email",tags:["Auth"]}},"/auth/callback/{provider}":{get:{description:"OAuth callback endpoint for SSO providers. Exchanges authorization code for access token and returns raw SSO user info. Returns HTML page that posts SSO data to parent window and auto-closes.",operationId:"AuthController_ssoCallback",parameters:[{name:"provider",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},summary:"SSO Callback",tags:["Auth"]}},"/auth/mfa/status":{get:{operationId:"MfaController_getStatus",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/MfaStatusResponseDto"}}}}},summary:"Get MFA status for the current user",tags:["Mfa"]}},"/auth/mfa/toggle":{post:{operationId:"MfaController_toggleMfa",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthToggleMfaRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaToggleResponseDto"}}}}},summary:"Enable or disable MFA for the current user",tags:["Mfa"]}},"/auth/mfa/devices":{get:{operationId:"MfaController_listDevices",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/MfaDeviceDto"}}}}}},summary:"List registered MFA devices",tags:["Mfa"]}},"/auth/mfa/devices/{deviceId}":{delete:{operationId:"MfaController_removeDevice",parameters:[{name:"deviceId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaDeviceRemovedResponseDto"}}}}},summary:"Remove a registered MFA device",tags:["Mfa"]}},"/auth/mfa/setup-totp":{post:{operationId:"MfaController_setupTotp",parameters:[],responses:{200:{description:""}},summary:"Setup TOTP Device",tags:["Mfa"]}},"/auth/mfa/verify-totp-setup":{post:{operationId:"MfaController_verifyTotpSetup",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthVerifyTotpSetupRequestDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaDeviceVerifiedResponseDto"}}}}},summary:"Verify TOTP Setup",tags:["Mfa"]}},"/auth/mfa/generate-recovery-code":{post:{operationId:"MfaController_generateRecoveryCodes",parameters:[],responses:{200:{description:""}},summary:"Generate Recovery Codes",tags:["Mfa"]}},"/auth/mfa/reset-totp":{post:{operationId:"MfaController_resetTotp",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/NestAuthMfaResetResponseDto"}}}}},summary:"Reset TOTP Device",tags:["Mfa"]}}},uSt={title:"@ackplus/nest-auth API",description:"OpenAPI specification generated from the Nest Auth module",version:"1.1.39",contact:{}},dSt=[],fSt=[],pSt={securitySchemes:{bearer:{scheme:"bearer",bearerFormat:"JWT",type:"http"}},schemas:{NestAuthSignupRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"},guard:{type:"string",description:"Guard context (e.g. admin, web, vendor) for isolation. Deprecated: use client",example:"admin",deprecated:!0}},required:["password"]},UserResponseDto:{type:"object",properties:{id:{type:"string",description:"User unique identifier",example:"123e4567-e89b-12d3-a456-426614174000"},email:{type:"string",description:"User email address",example:"user@example.com"},phone:{type:"string",description:"User phone number",example:"+1234567890"},isVerified:{type:"boolean",description:"Email verification status",example:!0},isMfaEnabled:{type:"boolean",description:"Whether MFA is enabled for this user",example:!1},roles:{description:"User roles (role names)",example:["admin","user"],type:"array",items:{type:"string"}},permissions:{description:"User permissions (flattened from roles)",example:["read:users","write:users"],type:"array",items:{type:"string"}},metadata:{type:"object",description:"Additional user metadata",example:{firstName:"John",lastName:"Doe"}},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"tenant-123"}},required:["id","isVerified"]},AuthWithTokensResponseDto:{type:"object",properties:{accessToken:{type:"string",description:"JWT access token (short-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJpYXQiOjE2OTk5OTk5OTksImV4cCI6MTY5OTk5OTk5OX0.xyz"},refreshToken:{type:"string",description:"JWT refresh token (long-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY5OTk5OTk5OX0.abc"},message:{type:"string",description:"Success message (added by controller based on configuration)",example:"Login successful"},isRequiresMfa:{type:"boolean",description:"Whether multi-factor authentication is required",example:!1},mfaMethods:{type:"array",description:"Available MFA methods when isRequiresMfa is true",example:["email","totp"],items:{type:"string",enum:["email","sms","totp"]}},defaultMfaMethod:{type:"string",description:"Default/recommended MFA method",example:"email",enum:["email","sms","totp"]},user:{description:"User information",allOf:[{$ref:"#/components/schemas/UserResponseDto"}]}},required:["accessToken","refreshToken","isRequiresMfa"]},EmailCredentialsDto:{type:"object",properties:{email:{type:"string",description:"User email address",example:"user@example.com"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8}},required:["email","password"]},PhoneCredentialsDto:{type:"object",properties:{phone:{type:"string",description:"User phone number",example:"+1234567890"},password:{type:"string",description:"User password",example:"SecurePass123!",minLength:8}},required:["phone","password"]},SocialCredentialsDto:{type:"object",properties:{token:{type:"string",description:"OAuth token or ID token from social provider",example:"ya29.a0AfH6SMBx1234567890abcdefghijklmnop"}},required:["token"]},NestAuthLoginRequestDto:{type:"object",properties:{providerName:{type:"string",description:"Authentication provider name",example:"email",enum:["email","phone","google","facebook","apple","github"],default:"email"},credentials:{description:"Login credentials - type varies by provider",examples:{emailLogin:{summary:"Email Login",value:{email:"user@example.com",password:"SecurePass123!"}},phoneLogin:{summary:"Phone Login",value:{phone:"+1234567890",password:"SecurePass123!"}},socialLogin:{summary:"Social Login (Google/Facebook/etc)",value:{token:"ya29.a0AfH6SMBx...",type:"idToken"}}},oneOf:[{$ref:"#/components/schemas/EmailCredentialsDto"},{$ref:"#/components/schemas/PhoneCredentialsDto"},{$ref:"#/components/schemas/SocialCredentialsDto"}]},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"},guard:{type:"string",description:"Guard context (e.g. admin, web, vendor) for isolation. Deprecated: use client",example:"admin",deprecated:!0},createUserIfNotExists:{type:"boolean",description:"Auto-create user if not exists (for social auth)",default:!1}},required:["credentials"]},NestAuthRefreshTokenRequestDto:{type:"object",properties:{refreshToken:{type:"string",description:"Refresh token to obtain new access token",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCJ9.abc123"}},required:["refreshToken"]},NestAuthMfaCodeSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA code sent successfully"}},required:["message"]},NestAuthMFAMethodEnum:{type:"string",enum:["email","sms","totp"]},NestAuthVerify2faRequestDto:{type:"object",properties:{method:{description:"MFA method used",example:"totp",allOf:[{$ref:"#/components/schemas/NestAuthMFAMethodEnum"}]},otp:{type:"string",description:"One-time password code",example:"123456",minLength:6,maxLength:8},rememberDevice:{type:"boolean",description:"Whether to trust this device for future logins",example:!0}},required:["method","otp"]},Verify2faWithTokensResponseDto:{type:"object",properties:{accessToken:{type:"string",description:"JWT access token (short-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJpYXQiOjE2OTk5OTk5OTksImV4cCI6MTY5OTk5OTk5OX0.xyz"},refreshToken:{type:"string",description:"JWT refresh token (long-lived)",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY5OTk5OTk5OX0.abc"},message:{type:"string",description:"Verification success message (added by controller)",example:"2FA verification successful"}},required:["accessToken","refreshToken"]},NestAuthLogoutResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Logged out successfully"}},required:["message"]},NestAuthLogoutAllResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Logged out from all devices"}},required:["message"]},NestAuthChangePasswordRequestDto:{type:"object",properties:{currentPassword:{type:"string",description:"Current password",example:"DemoOwner1!",minLength:8},newPassword:{type:"string",description:"New password",example:"DemoOwner1!New",minLength:8}},required:["currentPassword","newPassword"]},NestAuthForgotPasswordRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}}},NestAuthPasswordResetLinkSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"If your email is registered, you will receive a password reset link"}},required:["message"]},NestAuthVerifyForgotPasswordOtpRequestDto:{type:"object",properties:{email:{type:"string",description:"User email address (required if phone not provided)",example:"user@example.com"},phone:{type:"string",description:"User phone number (required if email not provided)",example:"+1234567890"},otp:{type:"string",description:"One-time password code received via email or SMS",example:"123456",minLength:6,maxLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}},required:["otp"]},VerifyOtpResponseDto:{type:"object",properties:{message:{type:"string",description:"Success message"},resetToken:{type:"string",description:"Password reset token - use this to reset password"}},required:["message"]},NestAuthResetPasswordWithTokenRequestDto:{type:"object",properties:{token:{type:"string",description:"Password reset token (JWT) received after OTP verification",example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz"},newPassword:{type:"string",description:"New password",example:"NewSecurePass123!",minLength:8}},required:["token","newPassword"]},NestAuthPasswordResetResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Password has been reset successfully"}},required:["message"]},NestAuthSendEmailVerificationRequestDto:{type:"object",properties:{tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}}},NestAuthEmailVerificationSentResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Verification email sent"}},required:["message"]},NestAuthVerifyEmailRequestDto:{type:"object",properties:{otp:{type:"string",description:"One-time password code received via email",example:"123456",minLength:6,maxLength:8},tenantId:{type:"string",description:"Tenant ID for multi-tenant applications",example:"123e4567-e89b-12d3-a456-426614174000"}},required:["otp"]},NestAuthEmailVerifiedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Email verified successfully"}},required:["message"]},MfaDeviceDto:{type:"object",properties:{id:{type:"string",description:"Unique identifier of the MFA device",example:"4b3c9c9c-9a9d-4d1e-8d9f-123456789abc"},deviceName:{type:"string",description:"Friendly name of the registered device",example:"Work laptop"},method:{type:"string",description:"MFA method this device supports",enum:["email","sms","totp"],example:"totp"},lastUsedAt:{format:"date-time",type:"string",description:"Timestamp of when the device was last used",example:"2024-05-20T12:34:56.000Z"},verified:{type:"boolean",description:"Whether the device setup has been verified",example:!0},createdAt:{format:"date-time",type:"string",description:"Timestamp of when the device was registered",example:"2024-05-18T10:15:00.000Z"}},required:["id","deviceName","method","verified"]},MfaStatusResponseDto:{type:"object",properties:{isEnabled:{type:"boolean",description:"Whether MFA is currently enabled for the user",example:!0},verifiedMethods:{type:"array",description:"MFA methods the user has verified and can currently use (includes EMAIL/SMS if configured, and TOTP if user has verified device)",example:["email","totp"],items:{type:"string",enum:["email","sms","totp"]}},configuredMethods:{type:"array",description:"All MFA methods configured and available in the application (methods user can potentially set up)",example:["email","totp","sms"],items:{type:"string",enum:["email","sms","totp"]}},allowUserToggle:{type:"boolean",description:"Indicates if MFA toggling is allowed for the user",example:!0},allowMethodSelection:{type:"boolean",description:"Indicates if users can choose their preferred MFA method",example:!0},totpDevices:{description:"Registered TOTP devices for the user",type:"array",items:{$ref:"#/components/schemas/MfaDeviceDto"}},hasRecoveryCode:{type:"boolean",description:"Whether a recovery code has been generated for the user",example:!1}},required:["isEnabled","verifiedMethods","configuredMethods","allowUserToggle","allowMethodSelection","totpDevices","hasRecoveryCode"]},NestAuthToggleMfaRequestDto:{type:"object",properties:{enabled:{type:"boolean",description:"Whether MFA should be enabled for the current user",example:!0}},required:["enabled"]},NestAuthMfaToggleResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA enabled successfully"}},required:["message"]},NestAuthMfaDeviceRemovedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Device removed successfully"}},required:["message"]},NestAuthSendMfaCodeRequestDto:{type:"object",properties:{method:{description:"MFA delivery method",example:"email",examples:{email:{value:"email",description:"Send OTP via email"},sms:{value:"sms",description:"Send OTP via SMS"},totp:{value:"totp",description:"Use authenticator app (TOTP)"}},allOf:[{$ref:"#/components/schemas/NestAuthMFAMethodEnum"}]}},required:["method"]},NestAuthVerifyTotpSetupRequestDto:{type:"object",properties:{otp:{type:"string",description:"The TOTP code from authenticator app",example:"123456",minLength:6,maxLength:6},secret:{type:"string",description:"Secret key from TOTP setup",example:"JBSWY3DPEHPK3PXP"}},required:["otp","secret"]},NestAuthMfaDeviceVerifiedResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"Device setup successfully"}},required:["message"]},NestAuthMfaResetResponseDto:{type:"object",properties:{message:{type:"string",description:"Response message",example:"MFA reset successfully"}},required:["message"]}}},mSt={openapi:lSt,paths:cSt,info:uSt,tags:dSt,servers:fSt,components:pSt},B2=({content:e})=>T.jsx(Cyt,{remarkPlugins:[MC],components:{code({node:t,inline:n,className:r,children:a,...i}){const o=/language-(\w+)/.exec(r||"");return!n&&o?T.jsx(Ive,{...i,style:nSt,language:o[1],PreTag:"div",customStyle:{margin:0,borderRadius:"0.5rem",fontSize:"0.875rem"},children:String(a).replace(/\n$/,"")}):T.jsx("code",{...i,className:`${r} bg-gray-100 text-gray-800 rounded px-1 py-0.5 text-sm font-mono`,children:a})},table({children:t}){return T.jsx("div",{className:"overflow-x-auto my-4 border border-gray-200 rounded-lg",children:T.jsx("table",{className:"min-w-full divide-y divide-gray-200",children:t})})},thead({children:t}){return T.jsx("thead",{className:"bg-gray-50",children:t})},th({children:t}){return T.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:t})},td({children:t}){return T.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 border-t border-gray-200",children:t})},a({href:t,children:n}){return T.jsx("a",{href:t,className:"text-primary-600 hover:text-primary-800 hover:underline",target:"_blank",rel:"noopener noreferrer",children:n})},h2({children:t}){return T.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-8 mb-4 pb-2 border-b border-gray-200",children:t})},h3({children:t}){return T.jsx("h3",{className:"text-xl font-semibold text-gray-900 mt-6 mb-3",children:t})},p({children:t}){return T.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:t})},ul({children:t}){return T.jsx("ul",{className:"list-disc list-inside space-y-1 mb-4 text-gray-700",children:t})},li({children:t}){return T.jsx("li",{className:"ml-4",children:t})},blockquote({children:t}){return T.jsx("blockquote",{className:"border-l-4 border-primary-500 pl-4 py-1 my-4 bg-primary-50 text-gray-700 italic rounded-r",children:t})}},children:e}),hSt=()=>{const[e,t]=te.useState(!1),[n,r]=te.useState(null),[a,i]=te.useState("api");te.useEffect(()=>{const l=mSt||{};!l||!l.paths||Object.keys(l.paths||{}).length===0?t(!0):r(l)},[]);const o=()=>{if(!n)return;const l=JSON.stringify(n,null,2),c=new Blob([l],{type:"application/json"}),u=URL.createObjectURL(c),d=document.createElement("a");d.href=u,d.download="nest-auth-api.json",document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(u)},s=[{id:"api",label:"API Explorer",icon:d7},{id:"config",label:"Configuration",icon:TFe},{id:"examples",label:"Examples",icon:YJ},{id:"events",label:"Events",icon:NFe},{id:"api-reference",label:"API Reference",icon:bFe},{id:"services",label:"Services",icon:YJ}];return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Iv,{title:"API Documentation",description:"Comprehensive guide and interactive API documentation.",action:a==="api"&&T.jsxs("button",{onClick:o,className:"btn-secondary flex items-center gap-2",disabled:e,children:[T.jsx(wFe,{className:"w-4 h-4"}),"Download JSON"]})}),T.jsx("div",{className:"border-b border-gray-200",children:T.jsx("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:s.map(l=>{const c=l.icon;return T.jsxs("button",{onClick:()=>i(l.id),className:`
5216
5216
  whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm flex items-center gap-2 transition-colors
5217
5217
  ${a===l.id?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}
5218
5218
  `,children:[T.jsx(c,{className:"w-4 h-4"}),l.label]},l.id)})})}),a==="api"&&(e?T.jsx("div",{className:"card",children:T.jsx("div",{className:"p-6 text-center",children:T.jsxs("div",{className:"p-4 bg-amber-50 border border-amber-200 rounded-lg flex items-start gap-3 mb-4",children:[T.jsx(Sf,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),T.jsxs("div",{className:"text-left",children:[T.jsx("p",{className:"font-semibold text-amber-900 mb-1",children:"API Documentation Not Available"}),T.jsx("p",{className:"text-sm text-amber-800",children:"The OpenAPI specification file could not be loaded. Make sure the OpenAPI spec has been generated by running the build process."})]})]})})}):T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"card bg-blue-50 border-blue-200",children:T.jsxs("div",{className:"p-4 flex items-start gap-3",children:[T.jsx(d7,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),T.jsxs("div",{className:"flex-1",children:[T.jsx("p",{className:"text-sm font-medium text-blue-900 mb-1",children:"Interactive API Documentation"}),T.jsx("p",{className:"text-sm text-blue-800",children:'This documentation is auto-generated from the OpenAPI specification. You can test endpoints directly from this page. Click "Download JSON" to get the raw OpenAPI specification file for importing into Postman or other API tools.'})]})]})}),n&&T.jsx(c0t,{spec:n})]})),a==="config"&&T.jsx("div",{className:"card p-8",children:T.jsx("div",{className:"prose prose-blue max-w-none",children:T.jsx(B2,{content:rSt})})}),a==="examples"&&T.jsx("div",{className:"card p-8",children:T.jsx("div",{className:"prose prose-blue max-w-none",children:T.jsx(B2,{content:aSt})})}),a==="events"&&T.jsx("div",{className:"card p-8",children:T.jsx("div",{className:"prose prose-blue max-w-none",children:T.jsx(B2,{content:iSt})})}),a==="api-reference"&&T.jsx("div",{className:"card p-8",children:T.jsx("div",{className:"prose prose-blue max-w-none",children:T.jsx(B2,{content:oSt})})}),a==="services"&&T.jsx("div",{className:"card p-8",children:T.jsx("div",{className:"prose prose-blue max-w-none",children:T.jsx(B2,{content:sSt})})})]})},bh=({children:e,authenticated:t})=>t===null?T.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-primary-600 mx-auto mb-4"}),T.jsx("p",{className:"text-gray-600 font-medium",children:"Verifying authentication..."})]})}):t?T.jsx(T.Fragment,{children:e}):T.jsx(p1,{to:"/login",replace:!0}),gSt=()=>{const[e,t]=te.useState(null),[n,r]=te.useState(null),[a,i]=te.useState(!1),[o,s]=te.useState(null);te.useEffect(()=>{l()},[]);const l=async()=>{try{await cn.get("/me"),t(!0);const d=await cn.get("/config");r(d)}catch(d){console.error("Auth check failed:",d),t(!1);try{const f=await cn.get("/config");r(f)}catch(f){console.error("Failed to load config:",f),r({allowAdminManagement:!1})}}finally{i(!0)}},c=async d=>{s(null);try{await cn.post("/login",d),t(!0),await l()}catch(f){throw t(!1),s((f==null?void 0:f.message)||"Login failed"),f}},u=async()=>{try{await cn.post("/logout",{})}catch(d){console.error("Logout failed:",d)}t(!1)};return!a||n===null?T.jsx("div",{className:"min-h-screen bg-gradient-to-br from-primary-50 via-blue-50 to-purple-50 flex items-center justify-center",children:T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-primary-600 rounded-full mb-4 shadow-lg",children:T.jsxs("svg",{className:"w-8 h-8 text-white animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[T.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),T.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),T.jsx("p",{className:"text-gray-700 font-medium text-lg",children:"Loading Nest Auth Dashboard..."}),T.jsx("p",{className:"text-gray-500 text-sm mt-2",children:"Verifying authentication"})]})}):T.jsx(mFe,{children:T.jsx(iFe,{children:T.jsxs(Yje,{children:[T.jsx(dc,{path:"/login",element:e?T.jsx(p1,{to:"/dashboard",replace:!0}):T.jsx(cBe,{onLogin:c,error:o})}),T.jsx(dc,{path:"/dashboard",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(Rht,{})})})}),T.jsx(dc,{path:"/users",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(zht,{})})})}),T.jsx(dc,{path:"/roles",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(Qht,{})})})}),T.jsx(dc,{path:"/tenants",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(Yht,{})})})}),T.jsx(dc,{path:"/permissions",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(i0t,{})})})}),T.jsx(dc,{path:"/api",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(hSt,{})})})}),n.allowAdminManagement&&T.jsx(dc,{path:"/admins",element:T.jsx(bh,{authenticated:e,children:T.jsx(dh,{config:n,onLogout:u,children:T.jsx(t0t,{})})})}),T.jsx(dc,{path:"/",element:e?T.jsx(p1,{to:"/dashboard",replace:!0}):T.jsx(p1,{to:"/login",replace:!0})}),T.jsx(dc,{path:"*",element:e?T.jsx(p1,{to:"/dashboard",replace:!0}):T.jsx(p1,{to:"/login",replace:!0})})]})})})},kie=document.getElementById("root");kie&&mD.createRoot(kie).render(T.jsx(fe.StrictMode,{children:T.jsx(gSt,{})}));/**
@@ -682,7 +682,7 @@
682
682
  "info": {
683
683
  "title": "@ackplus/nest-auth API",
684
684
  "description": "OpenAPI specification generated from the Nest Auth module",
685
- "version": "1.1.37",
685
+ "version": "1.1.39",
686
686
  "contact": {}
687
687
  },
688
688
  "tags": [],
@@ -4,13 +4,15 @@ import { JwtService } from '../../core/services/jwt.service';
4
4
  import { SessionManagerService } from '../../session/services/session-manager.service';
5
5
  import { AccessKeyService } from '../../user/services/access-key.service';
6
6
  import { AuthConfigService } from '../../core/services/auth-config.service';
7
+ import { DebugLoggerService } from '../../core/services/debug-logger.service';
7
8
  export declare class NestAuthAuthGuard implements CanActivate {
8
9
  private reflector;
9
10
  private jwtService;
10
11
  private sessionManager;
11
12
  private accessKeyService;
12
13
  private authConfigService;
13
- constructor(reflector: Reflector, jwtService: JwtService, sessionManager: SessionManagerService, accessKeyService: AccessKeyService, authConfigService: AuthConfigService);
14
+ private debugLogger;
15
+ constructor(reflector: Reflector, jwtService: JwtService, sessionManager: SessionManagerService, accessKeyService: AccessKeyService, authConfigService: AuthConfigService, debugLogger: DebugLoggerService);
14
16
  canActivate(context: ExecutionContext): Promise<boolean>;
15
17
  private extractToken;
16
18
  private handleJwtAuth;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,gBAAgB,EAA6C,MAAM,gBAAgB,CAAC;AAEtH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAK1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAkB5E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O,CAAC,iBAAiB;IACzB,OAAO,CAAC,WAAW;gBALX,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,qBAAqB,EACrC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,kBAAkB;IAGrC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA6H9D,OAAO,CAAC,YAAY;YAmDN,aAAa;YAwHb,gBAAgB;YAkEhB,QAAQ;YAsCR,kBAAkB;IA6DhC,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,gBAAgB;YAgBV,gBAAgB;YAwBhB,UAAU;YA0CV,gBAAgB;IA0C9B,OAAO,CAAC,kBAAkB;CAiB7B"}
@@ -22,52 +22,68 @@ const role_decorator_1 = require("../../core/decorators/role.decorator");
22
22
  const auth_config_service_1 = require("../../core/services/auth-config.service");
23
23
  const cookie_helper_1 = require("../../utils/cookie.helper");
24
24
  const lodash_1 = require("lodash");
25
+ const debug_logger_service_1 = require("../../core/services/debug-logger.service");
25
26
  let NestAuthAuthGuard = class NestAuthAuthGuard {
26
27
  reflector;
27
28
  jwtService;
28
29
  sessionManager;
29
30
  accessKeyService;
30
31
  authConfigService;
31
- constructor(reflector, jwtService, sessionManager, accessKeyService, authConfigService) {
32
+ debugLogger;
33
+ constructor(reflector, jwtService, sessionManager, accessKeyService, authConfigService, debugLogger) {
32
34
  this.reflector = reflector;
33
35
  this.jwtService = jwtService;
34
36
  this.sessionManager = sessionManager;
35
37
  this.accessKeyService = accessKeyService;
36
38
  this.authConfigService = authConfigService;
39
+ this.debugLogger = debugLogger;
37
40
  }
38
41
  async canActivate(context) {
39
42
  const request = context.switchToHttp().getRequest();
40
43
  const response = context.switchToHttp().getResponse();
44
+ this.debugLogger.logFunctionEntry('canActivate', 'AuthGuard', {
45
+ method: request.method,
46
+ url: request.url,
47
+ path: request.path
48
+ });
41
49
  const isOptional = this.reflector.getAllAndOverride(auth_constants_1.OPTIONAL_AUTH_KEY, [
42
50
  context.getHandler(),
43
51
  context.getClass(),
44
52
  ]);
53
+ this.debugLogger.debug(`Auth check - isOptional: ${isOptional}`, 'AuthGuard', { isOptional, path: request.path });
45
54
  request.user = null;
46
55
  request.session = null;
47
56
  request.accessKey = null;
48
57
  request.authType = null;
49
58
  const { token, authType } = this.extractToken(request);
50
59
  if (!token) {
60
+ this.debugLogger.debug('No token found in request', 'AuthGuard', { isOptional });
51
61
  if (isOptional) {
62
+ this.debugLogger.debug('Optional auth - proceeding without user data', 'AuthGuard');
52
63
  return true;
53
64
  }
54
65
  else {
66
+ this.debugLogger.warn('Required auth - no token provided', 'AuthGuard');
55
67
  throw new common_1.UnauthorizedException({
56
68
  message: 'No authentication provided',
57
69
  code: auth_constants_1.ERROR_CODES.NO_AUTH_PROVIDED
58
70
  });
59
71
  }
60
72
  }
73
+ this.debugLogger.debug(`Token found - authType: ${authType}`, 'AuthGuard', { authType, tokenLength: token.length });
61
74
  let isAuthenticated = false;
62
75
  try {
63
76
  switch (authType) {
64
77
  case 'bearer':
78
+ this.debugLogger.debug('Handling JWT authentication', 'AuthGuard');
65
79
  isAuthenticated = await this.handleJwtAuth(context, request, response, token, isOptional);
66
80
  break;
67
81
  case 'apikey':
82
+ this.debugLogger.debug('Handling API key authentication', 'AuthGuard');
68
83
  isAuthenticated = await this.handleApiKeyAuth(request, token, isOptional);
69
84
  break;
70
85
  default:
86
+ this.debugLogger.warn(`Invalid auth type: ${authType}`, 'AuthGuard');
71
87
  if (isOptional) {
72
88
  return true;
73
89
  }
@@ -80,19 +96,25 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
80
96
  }
81
97
  }
82
98
  catch (error) {
99
+ this.debugLogger.logError(error, 'AuthGuard', { isOptional, authType });
83
100
  if (isOptional) {
101
+ this.debugLogger.debug('Optional auth failed - proceeding without user data', 'AuthGuard');
84
102
  return true;
85
103
  }
86
104
  else {
87
105
  throw error;
88
106
  }
89
107
  }
108
+ this.debugLogger.debug(`Authentication result: ${isAuthenticated}`, 'AuthGuard', { isAuthenticated, userId: request.user?.sub || request.user?.id });
90
109
  if (!isAuthenticated && !isOptional) {
110
+ this.debugLogger.warn('Authentication failed (required)', 'AuthGuard');
91
111
  return false;
92
112
  }
93
113
  if (isAuthenticated && request.user) {
114
+ this.debugLogger.debug('Checking authorization (roles/permissions)', 'AuthGuard');
94
115
  await this.checkAuthorization(context, request);
95
116
  }
117
+ this.debugLogger.logFunctionExit('canActivate', 'AuthGuard', { allowed: true });
96
118
  return true;
97
119
  }
98
120
  extractToken(request) {
@@ -100,6 +122,7 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
100
122
  const accessTokenType = config.accessTokenType;
101
123
  const checkHeader = accessTokenType !== 'cookie';
102
124
  const checkCookie = accessTokenType !== 'header';
125
+ this.debugLogger.verbose('Extracting token from request', 'AuthGuard', { accessTokenType, checkHeader, checkCookie });
103
126
  if (checkHeader) {
104
127
  const authHeader = request.headers.authorization;
105
128
  if (authHeader) {
@@ -107,6 +130,7 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
107
130
  if (type && token) {
108
131
  const authType = type.toLowerCase();
109
132
  if (authType === 'bearer' || authType === 'apikey') {
133
+ this.debugLogger.debug(`Token extracted from Authorization header`, 'AuthGuard', { authType, source: 'header' });
110
134
  return { token, authType };
111
135
  }
112
136
  }
@@ -115,18 +139,25 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
115
139
  if (checkCookie) {
116
140
  const cookieToken = cookie_helper_1.CookieHelper.get(request, 'accessToken');
117
141
  if (cookieToken) {
142
+ this.debugLogger.debug('Token extracted from cookie', 'AuthGuard', { authType: 'bearer', source: 'cookie' });
118
143
  return { token: cookieToken, authType: 'bearer' };
119
144
  }
120
145
  }
146
+ this.debugLogger.verbose('No token found in request', 'AuthGuard');
121
147
  return { token: null, authType: null };
122
148
  }
123
149
  async handleJwtAuth(context, request, response, token, isOptional = false) {
150
+ this.debugLogger.logFunctionEntry('handleJwtAuth', 'AuthGuard', { isOptional });
124
151
  try {
152
+ this.debugLogger.verbose('Verifying JWT token', 'AuthGuard');
125
153
  const payload = await this.jwtService.verifyToken(token);
154
+ this.debugLogger.debug('JWT token verified successfully', 'AuthGuard', { userId: payload.sub, sessionId: payload.sessionId });
126
155
  const config = this.authConfigService.getConfig();
127
156
  if (config.guards?.beforeAuth) {
157
+ this.debugLogger.verbose('Executing beforeAuth hook', 'AuthGuard');
128
158
  const result = await config.guards.beforeAuth(request, payload);
129
159
  if (result && result.reject) {
160
+ this.debugLogger.warn('beforeAuth hook rejected authentication', 'AuthGuard', { reason: result.reason });
130
161
  throw new common_1.UnauthorizedException({
131
162
  message: result.reason || 'Authentication rejected by custom guard',
132
163
  code: auth_constants_1.ERROR_CODES.ACCESS_DENIED
@@ -135,8 +166,10 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
135
166
  }
136
167
  request.user = payload;
137
168
  request.authType = 'jwt';
169
+ this.debugLogger.verbose('Looking up session', 'AuthGuard', { sessionId: payload.sessionId });
138
170
  const session = await this.sessionManager.getSession(payload.sessionId);
139
171
  if (!session) {
172
+ this.debugLogger.warn('Session not found', 'AuthGuard', { sessionId: payload.sessionId });
140
173
  if (isOptional) {
141
174
  request.user = null;
142
175
  request.authType = null;
@@ -149,9 +182,12 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
149
182
  });
150
183
  }
151
184
  }
185
+ this.debugLogger.debug('Session found', 'AuthGuard', { sessionId: session.id });
152
186
  if (config.jwt?.validateToken) {
187
+ this.debugLogger.verbose('Executing validateToken hook', 'AuthGuard');
153
188
  const isValid = await config.jwt.validateToken(payload, session);
154
189
  if (!isValid) {
190
+ this.debugLogger.warn('validateToken hook returned invalid', 'AuthGuard');
155
191
  throw new common_1.UnauthorizedException({
156
192
  message: 'Token validation failed',
157
193
  code: auth_constants_1.ERROR_CODES.INVALID_TOKEN
@@ -160,6 +196,7 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
160
196
  }
161
197
  request.session = session;
162
198
  if (session.user && session.user.isActive === false) {
199
+ this.debugLogger.warn('User is not active', 'AuthGuard', { userId: session.user.id });
163
200
  if (isOptional) {
164
201
  request.user = null;
165
202
  request.authType = null;
@@ -174,14 +211,18 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
174
211
  }
175
212
  await this.checkMfa(context, payload, isOptional);
176
213
  if (config.guards?.afterAuth) {
214
+ this.debugLogger.verbose('Executing afterAuth hook', 'AuthGuard');
177
215
  if (session.data?.user) {
178
216
  await config.guards.afterAuth(request, session.data.user, session);
179
217
  }
180
218
  }
219
+ this.debugLogger.logFunctionExit('handleJwtAuth', 'AuthGuard', { success: true });
181
220
  return true;
182
221
  }
183
222
  catch (error) {
223
+ this.debugLogger.logError(error, 'AuthGuard.handleJwtAuth');
184
224
  if (isOptional) {
225
+ this.debugLogger.debug('JWT auth failed but optional - continuing', 'AuthGuard');
185
226
  return true;
186
227
  }
187
228
  else {
@@ -196,8 +237,10 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
196
237
  }
197
238
  }
198
239
  async handleApiKeyAuth(request, token, isOptional = false) {
240
+ this.debugLogger.logFunctionEntry('handleApiKeyAuth', 'AuthGuard', { isOptional });
199
241
  const [publicKey, privateKey] = token.split('.');
200
242
  if (!publicKey || !privateKey) {
243
+ this.debugLogger.warn('Invalid API key format', 'AuthGuard');
201
244
  if (isOptional) {
202
245
  return false;
203
246
  }
@@ -209,8 +252,10 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
209
252
  }
210
253
  }
211
254
  try {
255
+ this.debugLogger.verbose('Validating API key', 'AuthGuard', { publicKey: publicKey.substring(0, 8) + '...' });
212
256
  const isValid = await this.accessKeyService.validateAccessKey(publicKey, privateKey);
213
257
  if (!isValid) {
258
+ this.debugLogger.warn('Invalid API key', 'AuthGuard');
214
259
  if (isOptional) {
215
260
  return false;
216
261
  }
@@ -221,14 +266,18 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
221
266
  });
222
267
  }
223
268
  }
269
+ this.debugLogger.verbose('Getting access key details', 'AuthGuard');
224
270
  const accessKey = await this.accessKeyService.getAccessKey(publicKey);
225
271
  await this.accessKeyService.updateAccessKeyLastUsed(publicKey);
226
272
  request.user = accessKey.user;
227
273
  request.accessKey = accessKey;
228
274
  request.authType = 'api-key';
275
+ this.debugLogger.debug('API key authentication successful', 'AuthGuard', { userId: accessKey.user?.id, keyName: accessKey.name });
276
+ this.debugLogger.logFunctionExit('handleApiKeyAuth', 'AuthGuard', { success: true });
229
277
  return true;
230
278
  }
231
279
  catch (error) {
280
+ this.debugLogger.logError(error, 'AuthGuard.handleApiKeyAuth');
232
281
  if (isOptional) {
233
282
  return false;
234
283
  }
@@ -244,7 +293,9 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
244
293
  ]);
245
294
  const isMfaEnabled = payload.isMfaEnabled;
246
295
  const isMfaVerified = payload.isMfaVerified;
296
+ this.debugLogger.verbose('Checking MFA requirements', 'AuthGuard', { isMfaEnabled, isMfaVerified, skipMfa });
247
297
  if (isMfaEnabled && !isMfaVerified && !skipMfa) {
298
+ this.debugLogger.warn('MFA verification required but not verified', 'AuthGuard');
248
299
  if (isOptional) {
249
300
  throw new Error('MFA verification required - cannot proceed with optional auth');
250
301
  }
@@ -255,27 +306,34 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
255
306
  });
256
307
  }
257
308
  }
309
+ this.debugLogger.debug('MFA check passed', 'AuthGuard');
258
310
  }
259
311
  async checkAuthorization(context, request) {
260
312
  const requiredPermissions = this.getRequiredPermissions(context);
261
313
  const requiredRoles = this.getRequiredRoles(context);
262
314
  const requiredGuard = this.getRequiredGuard(context);
315
+ this.debugLogger.verbose('Checking authorization requirements', 'AuthGuard', { requiredPermissions, requiredRoles, requiredGuard });
263
316
  if (!requiredPermissions.length && !requiredRoles.length) {
317
+ this.debugLogger.debug('No authorization requirements - allowing access', 'AuthGuard');
264
318
  return;
265
319
  }
266
320
  const user = request.user;
267
321
  if (!user) {
322
+ this.debugLogger.warn('Authorization check failed - no user', 'AuthGuard');
268
323
  throw new common_1.ForbiddenException({
269
324
  message: 'Access denied: User not authenticated',
270
325
  code: auth_constants_1.ERROR_CODES.UNAUTHORIZED,
271
326
  });
272
327
  }
273
328
  if (requiredRoles.length > 0) {
329
+ this.debugLogger.debug('Checking required roles', 'AuthGuard', { requiredRoles, requiredGuard });
274
330
  await this.checkRoles(user, requiredRoles, requiredGuard);
275
331
  }
276
332
  if (requiredPermissions.length > 0) {
333
+ this.debugLogger.debug('Checking required permissions', 'AuthGuard', { requiredPermissions });
277
334
  await this.checkPermissions(user, requiredPermissions);
278
335
  }
336
+ this.debugLogger.debug('Authorization check passed', 'AuthGuard');
279
337
  }
280
338
  getRequiredPermissions(context) {
281
339
  let permissions = this.reflector.getAllAndOverride(permissions_decorator_1.PERMISSIONS_KEY, [context.getHandler(), context.getClass()]);
@@ -377,6 +435,7 @@ exports.NestAuthAuthGuard = NestAuthAuthGuard = __decorate([
377
435
  jwt_service_1.JwtService,
378
436
  session_manager_service_1.SessionManagerService,
379
437
  access_key_service_1.AccessKeyService,
380
- auth_config_service_1.AuthConfigService])
438
+ auth_config_service_1.AuthConfigService,
439
+ debug_logger_service_1.DebugLoggerService])
381
440
  ], NestAuthAuthGuard);
382
441
  //# sourceMappingURL=auth.guard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../../src/lib/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsH;AACtH,yDAAsE;AACtE,uCAAyC;AAEzC,iEAA6D;AAC7D,4FAAuF;AACvF,+EAA0E;AAE1E,iFAAwE;AACxE,uFAA8E;AAC9E,yEAA4E;AAC5E,iFAA4E;AAC5E,6DAAyD;AACzD,mCAA8B;AAiBvB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEd;IACA;IACA;IACA;IACA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KAAY;QACnC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QAEtC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAEjB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACjB,OAAO;YACX,CAAC;YAGD,IAAI,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBACtD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;YACxE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA;AAtoBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAGc,gBAAS;QACR,wBAAU;QACN,+CAAqB;QACnB,qCAAgB;QACf,uCAAiB;QACvB,yCAAkB;GAPlC,iBAAiB,CAsoB7B"}
@@ -1,9 +1,11 @@
1
1
  import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Request, Response } from 'express';
4
+ import { DebugLoggerService } from '../../core/services/debug-logger.service';
4
5
  export declare class TokenResponseInterceptor implements NestInterceptor {
6
+ private readonly debugLogger;
5
7
  private readonly options;
6
- constructor();
8
+ constructor(debugLogger: DebugLoggerService);
7
9
  isUsingCookies(req: Request): boolean;
8
10
  intercept(context: ExecutionContext, next: CallHandler): Promise<Observable<any>>;
9
11
  setTokens(response: Response, tokens: {
@@ -1 +1 @@
1
- {"version":3,"file":"token-response.interceptor.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/interceptors/token-response.interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5F,O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AC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;QAClC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAA;KACtB,GAAG,IAAI;IA+BR,OAAO,CAAC,SAAS;CA0BpB"}
@@ -20,18 +20,25 @@ const auth_constants_1 = require("../../auth.constants");
20
20
  const ms_1 = __importDefault(require("ms"));
21
21
  const lodash_1 = require("lodash");
22
22
  const cookie_helper_1 = require("../../utils/cookie.helper");
23
+ const debug_logger_service_1 = require("../../core/services/debug-logger.service");
23
24
  let TokenResponseInterceptor = class TokenResponseInterceptor {
25
+ debugLogger;
24
26
  options;
25
- constructor() {
27
+ constructor(debugLogger) {
28
+ this.debugLogger = debugLogger;
26
29
  this.options = auth_config_service_1.AuthConfigService.getOptions();
27
30
  }
28
31
  isUsingCookies(req) {
29
- if (!this.options.accessTokenType && req.headers['x-access-token-type'] === 'cookie') {
32
+ const headerTokenType = req.headers['x-access-token-type'];
33
+ if (!this.options.accessTokenType && headerTokenType === 'cookie') {
34
+ this.debugLogger.debug('Using cookies mode (from x-access-token-type header)', 'TokenResponseInterceptor', { headerTokenType });
30
35
  return true;
31
36
  }
32
37
  else if (this.options.accessTokenType === 'cookie') {
38
+ this.debugLogger.debug('Using cookies mode (from config)', 'TokenResponseInterceptor', { configTokenType: this.options.accessTokenType });
33
39
  return true;
34
40
  }
41
+ this.debugLogger.debug('Using header mode for tokens', 'TokenResponseInterceptor', { configTokenType: this.options.accessTokenType, headerTokenType });
35
42
  return false;
36
43
  }
37
44
  async intercept(context, next) {
@@ -39,46 +46,74 @@ let TokenResponseInterceptor = class TokenResponseInterceptor {
39
46
  const req = ctx.getRequest();
40
47
  const res = ctx.getResponse();
41
48
  const isUsingCookies = await this.isUsingCookies(req);
49
+ this.debugLogger.logFunctionEntry('intercept', 'TokenResponseInterceptor', {
50
+ method: req.method,
51
+ url: req.url,
52
+ isUsingCookies
53
+ });
42
54
  return next.handle().pipe((0, operators_1.map)(data => {
43
- if (!data)
55
+ if (!data) {
56
+ this.debugLogger.debug('No data to process', 'TokenResponseInterceptor');
44
57
  return data;
58
+ }
45
59
  if (isUsingCookies) {
60
+ this.debugLogger.debug('Setting tokens in cookies and removing from response body', 'TokenResponseInterceptor', {
61
+ hasAccessToken: !!data.accessToken,
62
+ hasRefreshToken: !!data.refreshToken,
63
+ hasTrustToken: !!data.trustToken
64
+ });
46
65
  this.setTokens(res, data);
47
66
  return (0, lodash_1.omit)(data, ['accessToken', 'refreshToken', 'trustToken']);
48
67
  }
68
+ this.debugLogger.debug('Returning tokens in response body (header mode)', 'TokenResponseInterceptor', {
69
+ hasAccessToken: !!data.accessToken,
70
+ hasRefreshToken: !!data.refreshToken
71
+ });
49
72
  return data;
50
73
  }));
51
74
  }
52
75
  setTokens(response, tokens) {
53
76
  if (tokens.accessToken) {
77
+ this.debugLogger.debug(`Setting access token cookie: ${auth_constants_1.ACCESS_TOKEN_COOKIE_NAME}`, 'TokenResponseInterceptor');
54
78
  this.setCookie(response, auth_constants_1.ACCESS_TOKEN_COOKIE_NAME, tokens.accessToken);
55
79
  }
56
80
  if (tokens.refreshToken) {
81
+ this.debugLogger.debug(`Setting refresh token cookie: ${auth_constants_1.REFRESH_TOKEN_COOKIE_NAME}`, 'TokenResponseInterceptor');
57
82
  this.setCookie(response, auth_constants_1.REFRESH_TOKEN_COOKIE_NAME, tokens.refreshToken);
58
83
  }
59
84
  if (tokens.trustToken) {
60
85
  const trustCookieName = auth_config_service_1.AuthConfigService.getOptions().mfa?.trustDeviceStorageName || auth_constants_1.NEST_AUTH_TRUST_DEVICE_KEY;
61
86
  const duration = auth_config_service_1.AuthConfigService.getOptions().mfa?.trustedDeviceDuration || '30d';
62
87
  const maxAge = typeof duration === 'string' ? (0, ms_1.default)(duration) : duration;
88
+ this.debugLogger.debug(`Setting trust device cookie: ${trustCookieName}`, 'TokenResponseInterceptor', { duration, maxAge });
63
89
  this.setCookie(response, trustCookieName, tokens.trustToken, {
64
90
  maxAge,
65
91
  });
66
92
  }
67
93
  }
68
94
  setCookie(response, name, token, options) {
69
- cookie_helper_1.CookieHelper.set(response, name, token, {
95
+ const cookieOptions = {
70
96
  httpOnly: true,
71
97
  path: '/',
72
98
  secure: this.options.cookieOptions?.secure,
73
99
  sameSite: this.options.cookieOptions?.sameSite,
74
100
  maxAge: (0, ms_1.default)(this.options.session?.sessionExpiry || '7d'),
75
101
  ...options,
102
+ };
103
+ this.debugLogger.verbose(`Setting cookie: ${name}`, 'TokenResponseInterceptor', {
104
+ cookieName: name,
105
+ httpOnly: cookieOptions.httpOnly,
106
+ secure: cookieOptions.secure,
107
+ sameSite: cookieOptions.sameSite,
108
+ maxAge: cookieOptions.maxAge,
109
+ path: cookieOptions.path
76
110
  });
111
+ cookie_helper_1.CookieHelper.set(response, name, token, cookieOptions);
77
112
  }
78
113
  };
79
114
  exports.TokenResponseInterceptor = TokenResponseInterceptor;
80
115
  exports.TokenResponseInterceptor = TokenResponseInterceptor = __decorate([
81
116
  (0, common_1.Injectable)(),
82
- __metadata("design:paramtypes", [])
117
+ __metadata("design:paramtypes", [debug_logger_service_1.DebugLoggerService])
83
118
  ], TokenResponseInterceptor);
84
119
  //# sourceMappingURL=token-response.interceptor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-response.interceptor.js","sourceRoot":"","sources":["../../../../src/lib/auth/interceptors/token-response.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4F;AAE5F,8CAAqC;AAErC,iFAA4E;AAC5E,yDAAuH;AAEvH,4CAAoB;AACpB,mCAA8B;AAC9B,6DAAwE;AAGjE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEhB,OAAO,CAAqB;IAE7C;QACI,IAAI,CAAC,OAAO,GAAG,uCAAiB,CAAC,UAAU,EAAE,CAAC;IAClD,CAAC;IAGD,cAAc,CAAC,GAAY;QACvB,IAAI,CAAC,IAAI,CAAC,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MAAM,CAAC,YAAY,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACpB,MAAM,eAAe,GAAG,uCAAiB,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,sBAAsB,IAAI,2CAA0B,CAAC;YACjH,MAAM,QAAQ,GAAG,uCAAiB,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,qBAAqB,IAAI,KAAK,CAAC;YACpF,MAAM,MAAM,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,YAAE,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YAEtE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE;gBACzD,MAAM;aACT,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,QAAkB,EAAE,IAAY,EAAE,KAAa,EAAE,OAAgC;QAE/F,4BAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;YACpC,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,GAAG;YACT,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM;YAC1C,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAiD;YACvF,MAAM,EAAE,IAAA,YAAE,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,IAAI,IAAI,CAAC;YACvD,GAAG,OAAO;SACb,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA5EY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;;GACA,wBAAwB,CA4EpC"}
1
+ {"version":3,"file":"token-response.interceptor.js","sourceRoot":"","sources":["../../../../src/lib/auth/interceptors/token-response.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4F;AAE5F,8CAAqC;AAErC,iF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E,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,MAAM;YAC1C,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAiD;YACvF,MAAM,EAAE,IAAA,YAAE,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,IAAI,IAAI,CAAC;YACvD,GAAG,OAAO;SACb,CAAC;QAEF,IAAI,CAAC,WAAW,CAAC,OAAO,CACpB,mBAAmB,IAAI,EAAE,EACzB,0BAA0B,EAC1B;YACI,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,IAAI,EAAE,aAAa,CAAC,IAAI;SAC3B,CACJ,CAAC;QAGF,4BAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AAlJY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAKiC,yCAAkB;GAJnD,wBAAwB,CAkJpC"}
@@ -18,6 +18,5 @@ export declare class RoleService {
18
18
  updateRole(id: string, data: Partial<NestAuthRole>): Promise<NestAuthRole>;
19
19
  updateRolePermissions(id: string, permissionIds: string | string[]): Promise<NestAuthRole>;
20
20
  deleteRole(id: string): Promise<void>;
21
- deleteSystemRole(id: string): Promise<void>;
22
21
  }
23
22
  //# sourceMappingURL=role.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"role.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/role/services/role.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAU,UAAU,EAAY,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aA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MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;KACxB,EACN,OAAO,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,GACxC,OAAO,CAAC,YAAY,EAAE,CAAC;IAyDpB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAqC1E,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAe1F,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAY9C"}
@@ -149,30 +149,22 @@ let RoleService = class RoleService {
149
149
  code: 'ROLE_NOT_FOUND'
150
150
  });
151
151
  }
152
- if (role.isSystem) {
153
- throw new common_1.ConflictException({
154
- message: 'Cannot update system role',
155
- code: 'SYSTEM_ROLE_UPDATE_ERROR',
156
- });
157
- }
158
152
  delete data.isSystem;
159
153
  delete data.tenantId;
160
- if ((data.name && data.name !== role.name) || (data.guard && data.guard !== role.guard)) {
161
- const systemRole = await this.getRoleByName(data.name || role.name, data.guard || role.guard);
162
- if (systemRole) {
163
- throw new common_1.ConflictException({
164
- message: `Cannot use name '${data.name || role.name}' as it conflicts with a system role`,
165
- code: 'SYSTEM_ROLE_CONFLICT'
166
- });
167
- }
168
- const existingRole = await this.getRoleByName(data.name || role.name, data.guard || role.guard, role.tenantId);
169
- if (existingRole && existingRole.id !== role.id) {
170
- throw new common_1.ConflictException({
171
- message: `Role with name '${data.name || role.name}' already exists in guard '${data.guard || role.guard}'${role.tenantId ? ` for tenant '${role.tenantId}'` : ''}`,
172
- code: 'ROLE_ALREADY_EXISTS'
173
- });
174
- }
154
+ if (data.name && data.name !== role.name) {
155
+ throw new common_1.BadRequestException({
156
+ message: 'Cannot update role name. Please delete and create a new role if you need to change the name.',
157
+ code: 'ROLE_NAME_UPDATE_NOT_ALLOWED'
158
+ });
175
159
  }
160
+ if (data.guard && data.guard !== role.guard) {
161
+ throw new common_1.BadRequestException({
162
+ message: 'Cannot update role guard. Please delete and create a new role if you need to change the guard.',
163
+ code: 'ROLE_GUARD_UPDATE_NOT_ALLOWED'
164
+ });
165
+ }
166
+ delete data.name;
167
+ delete data.guard;
176
168
  Object.assign(role, data);
177
169
  return this.roleRepository.save(role);
178
170
  }
@@ -184,12 +176,6 @@ let RoleService = class RoleService {
184
176
  code: 'ROLE_NOT_FOUND'
185
177
  });
186
178
  }
187
- if (role.isSystem) {
188
- throw new common_1.BadRequestException({
189
- message: 'Cannot update system role',
190
- code: 'SYSTEM_ROLE_UPDATE_ERROR',
191
- });
192
- }
193
179
  await role.syncPermissions(permissionIds);
194
180
  return this.roleRepository.save(role);
195
181
  }
@@ -201,20 +187,8 @@ let RoleService = class RoleService {
201
187
  code: 'ROLE_NOT_FOUND'
202
188
  });
203
189
  }
204
- if (role.isSystem) {
205
- throw new common_1.BadRequestException({
206
- message: 'Cannot delete system role',
207
- code: 'SYSTEM_ROLE_DELETE_ERROR',
208
- });
209
- }
210
190
  await this.roleRepository.remove(role);
211
191
  }
212
- async deleteSystemRole(id) {
213
- const role = await this.getRoleById(id);
214
- if (role?.isSystem) {
215
- await this.roleRepository.remove(role);
216
- }
217
- }
218
192
  };
219
193
  exports.RoleService = RoleService;
220
194
  exports.RoleService = RoleService = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"role.service.js","sourceRoot":"","sources":["../../../../src/lib/role/services/role.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuG;AACvG,6CAAmD;AACnD,qCAAwF;AACxF,yDAAuD;AACvD,yCAA6C;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAGR;IACA;IAHZ,YAEY,cAAwC,EACxC,aAA4B;QAD5B,mBAAc,GAAd,cAAc,CAA0B;QACxC,kBAAa,GAAb,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EAAE,YAAY;gBACvC,IAAI,EAAE,gBAAgB;aACzB,CAAC,CAAC;QACP,CAAC;QAED,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACJ,CAAA;AAjPY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,EAAC,0BAAY,CAAC,CAAA;qCACP,oBAAU;QACX,sBAAa;GAJ/B,WAAW,CAiPvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ackplus/nest-auth",
3
- "version": "1.1.37",
3
+ "version": "1.1.39",
4
4
  "description": "Powerful CRUD operations for NestJS with TypeORM - automatic REST endpoints, advanced filtering, relations, pagination, and more",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
@@ -39,7 +39,7 @@
39
39
  "qrcode": "^1.5.0",
40
40
  "qs": "^6.11.2",
41
41
  "speakeasy": "^2.0.0",
42
- "@ackplus/nest-auth-contracts": "1.1.37"
42
+ "@ackplus/nest-auth-contracts": "1.1.39"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@nestjs/common": "^10 || ^11",