@ackplus/nest-auth 1.1.39 → 1.1.41

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.
@@ -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.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:`
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.41",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.39",
685
+ "version": "1.1.41",
686
686
  "contact": {}
687
687
  },
688
688
  "tags": [],
@@ -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,U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vF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAK1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAG5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAgB9E,qBACa,iBAAkB,YAAW,WAAW;IAE7C,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,gBAAgB;IACxB,OAAO,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;IA6F9D,OAAO,CAAC,YAAY;YAmCN,aAAa;YAqGb,gBAAgB;YAwDhB,QAAQ;YA8BR,kBAAkB;IA2ChC,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,gBAAgB;YAgBV,gBAAgB;YAwBhB,UAAU;YA0CV,gBAAgB;IA0C9B,OAAO,CAAC,kBAAkB;CAiB7B"}
@@ -41,25 +41,17 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
41
41
  async canActivate(context) {
42
42
  const request = context.switchToHttp().getRequest();
43
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
- });
49
44
  const isOptional = this.reflector.getAllAndOverride(auth_constants_1.OPTIONAL_AUTH_KEY, [
50
45
  context.getHandler(),
51
46
  context.getClass(),
52
47
  ]);
53
- this.debugLogger.debug(`Auth check - isOptional: ${isOptional}`, 'AuthGuard', { isOptional, path: request.path });
54
48
  request.user = null;
55
49
  request.session = null;
56
50
  request.accessKey = null;
57
51
  request.authType = null;
58
52
  const { token, authType } = this.extractToken(request);
59
53
  if (!token) {
60
- this.debugLogger.debug('No token found in request', 'AuthGuard', { isOptional });
61
54
  if (isOptional) {
62
- this.debugLogger.debug('Optional auth - proceeding without user data', 'AuthGuard');
63
55
  return true;
64
56
  }
65
57
  else {
@@ -70,7 +62,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
70
62
  });
71
63
  }
72
64
  }
73
- this.debugLogger.debug(`Token found - authType: ${authType}`, 'AuthGuard', { authType, tokenLength: token.length });
74
65
  let isAuthenticated = false;
75
66
  try {
76
67
  switch (authType) {
@@ -98,23 +89,19 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
98
89
  catch (error) {
99
90
  this.debugLogger.logError(error, 'AuthGuard', { isOptional, authType });
100
91
  if (isOptional) {
101
- this.debugLogger.debug('Optional auth failed - proceeding without user data', 'AuthGuard');
102
92
  return true;
103
93
  }
104
94
  else {
105
95
  throw error;
106
96
  }
107
97
  }
108
- this.debugLogger.debug(`Authentication result: ${isAuthenticated}`, 'AuthGuard', { isAuthenticated, userId: request.user?.sub || request.user?.id });
109
98
  if (!isAuthenticated && !isOptional) {
110
99
  this.debugLogger.warn('Authentication failed (required)', 'AuthGuard');
111
100
  return false;
112
101
  }
113
102
  if (isAuthenticated && request.user) {
114
- this.debugLogger.debug('Checking authorization (roles/permissions)', 'AuthGuard');
115
103
  await this.checkAuthorization(context, request);
116
104
  }
117
- this.debugLogger.logFunctionExit('canActivate', 'AuthGuard', { allowed: true });
118
105
  return true;
119
106
  }
120
107
  extractToken(request) {
@@ -122,7 +109,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
122
109
  const accessTokenType = config.accessTokenType;
123
110
  const checkHeader = accessTokenType !== 'cookie';
124
111
  const checkCookie = accessTokenType !== 'header';
125
- this.debugLogger.verbose('Extracting token from request', 'AuthGuard', { accessTokenType, checkHeader, checkCookie });
126
112
  if (checkHeader) {
127
113
  const authHeader = request.headers.authorization;
128
114
  if (authHeader) {
@@ -130,7 +116,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
130
116
  if (type && token) {
131
117
  const authType = type.toLowerCase();
132
118
  if (authType === 'bearer' || authType === 'apikey') {
133
- this.debugLogger.debug(`Token extracted from Authorization header`, 'AuthGuard', { authType, source: 'header' });
134
119
  return { token, authType };
135
120
  }
136
121
  }
@@ -139,7 +124,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
139
124
  if (checkCookie) {
140
125
  const cookieToken = cookie_helper_1.CookieHelper.get(request, 'accessToken');
141
126
  if (cookieToken) {
142
- this.debugLogger.debug('Token extracted from cookie', 'AuthGuard', { authType: 'bearer', source: 'cookie' });
143
127
  return { token: cookieToken, authType: 'bearer' };
144
128
  }
145
129
  }
@@ -147,17 +131,12 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
147
131
  return { token: null, authType: null };
148
132
  }
149
133
  async handleJwtAuth(context, request, response, token, isOptional = false) {
150
- this.debugLogger.logFunctionEntry('handleJwtAuth', 'AuthGuard', { isOptional });
151
134
  try {
152
- this.debugLogger.verbose('Verifying JWT token', 'AuthGuard');
153
135
  const payload = await this.jwtService.verifyToken(token);
154
- this.debugLogger.debug('JWT token verified successfully', 'AuthGuard', { userId: payload.sub, sessionId: payload.sessionId });
155
136
  const config = this.authConfigService.getConfig();
156
137
  if (config.guards?.beforeAuth) {
157
- this.debugLogger.verbose('Executing beforeAuth hook', 'AuthGuard');
158
138
  const result = await config.guards.beforeAuth(request, payload);
159
139
  if (result && result.reject) {
160
- this.debugLogger.warn('beforeAuth hook rejected authentication', 'AuthGuard', { reason: result.reason });
161
140
  throw new common_1.UnauthorizedException({
162
141
  message: result.reason || 'Authentication rejected by custom guard',
163
142
  code: auth_constants_1.ERROR_CODES.ACCESS_DENIED
@@ -166,10 +145,8 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
166
145
  }
167
146
  request.user = payload;
168
147
  request.authType = 'jwt';
169
- this.debugLogger.verbose('Looking up session', 'AuthGuard', { sessionId: payload.sessionId });
170
148
  const session = await this.sessionManager.getSession(payload.sessionId);
171
149
  if (!session) {
172
- this.debugLogger.warn('Session not found', 'AuthGuard', { sessionId: payload.sessionId });
173
150
  if (isOptional) {
174
151
  request.user = null;
175
152
  request.authType = null;
@@ -182,9 +159,7 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
182
159
  });
183
160
  }
184
161
  }
185
- this.debugLogger.debug('Session found', 'AuthGuard', { sessionId: session.id });
186
162
  if (config.jwt?.validateToken) {
187
- this.debugLogger.verbose('Executing validateToken hook', 'AuthGuard');
188
163
  const isValid = await config.jwt.validateToken(payload, session);
189
164
  if (!isValid) {
190
165
  this.debugLogger.warn('validateToken hook returned invalid', 'AuthGuard');
@@ -211,18 +186,14 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
211
186
  }
212
187
  await this.checkMfa(context, payload, isOptional);
213
188
  if (config.guards?.afterAuth) {
214
- this.debugLogger.verbose('Executing afterAuth hook', 'AuthGuard');
215
189
  if (session.data?.user) {
216
190
  await config.guards.afterAuth(request, session.data.user, session);
217
191
  }
218
192
  }
219
- this.debugLogger.logFunctionExit('handleJwtAuth', 'AuthGuard', { success: true });
220
193
  return true;
221
194
  }
222
195
  catch (error) {
223
- this.debugLogger.logError(error, 'AuthGuard.handleJwtAuth');
224
196
  if (isOptional) {
225
- this.debugLogger.debug('JWT auth failed but optional - continuing', 'AuthGuard');
226
197
  return true;
227
198
  }
228
199
  else {
@@ -237,7 +208,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
237
208
  }
238
209
  }
239
210
  async handleApiKeyAuth(request, token, isOptional = false) {
240
- this.debugLogger.logFunctionEntry('handleApiKeyAuth', 'AuthGuard', { isOptional });
241
211
  const [publicKey, privateKey] = token.split('.');
242
212
  if (!publicKey || !privateKey) {
243
213
  this.debugLogger.warn('Invalid API key format', 'AuthGuard');
@@ -252,7 +222,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
252
222
  }
253
223
  }
254
224
  try {
255
- this.debugLogger.verbose('Validating API key', 'AuthGuard', { publicKey: publicKey.substring(0, 8) + '...' });
256
225
  const isValid = await this.accessKeyService.validateAccessKey(publicKey, privateKey);
257
226
  if (!isValid) {
258
227
  this.debugLogger.warn('Invalid API key', 'AuthGuard');
@@ -266,14 +235,11 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
266
235
  });
267
236
  }
268
237
  }
269
- this.debugLogger.verbose('Getting access key details', 'AuthGuard');
270
238
  const accessKey = await this.accessKeyService.getAccessKey(publicKey);
271
239
  await this.accessKeyService.updateAccessKeyLastUsed(publicKey);
272
240
  request.user = accessKey.user;
273
241
  request.accessKey = accessKey;
274
242
  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 });
277
243
  return true;
278
244
  }
279
245
  catch (error) {
@@ -293,7 +259,6 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
293
259
  ]);
294
260
  const isMfaEnabled = payload.isMfaEnabled;
295
261
  const isMfaVerified = payload.isMfaVerified;
296
- this.debugLogger.verbose('Checking MFA requirements', 'AuthGuard', { isMfaEnabled, isMfaVerified, skipMfa });
297
262
  if (isMfaEnabled && !isMfaVerified && !skipMfa) {
298
263
  this.debugLogger.warn('MFA verification required but not verified', 'AuthGuard');
299
264
  if (isOptional) {
@@ -306,13 +271,11 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
306
271
  });
307
272
  }
308
273
  }
309
- this.debugLogger.debug('MFA check passed', 'AuthGuard');
310
274
  }
311
275
  async checkAuthorization(context, request) {
312
276
  const requiredPermissions = this.getRequiredPermissions(context);
313
277
  const requiredRoles = this.getRequiredRoles(context);
314
278
  const requiredGuard = this.getRequiredGuard(context);
315
- this.debugLogger.verbose('Checking authorization requirements', 'AuthGuard', { requiredPermissions, requiredRoles, requiredGuard });
316
279
  if (!requiredPermissions.length && !requiredRoles.length) {
317
280
  this.debugLogger.debug('No authorization requirements - allowing access', 'AuthGuard');
318
281
  return;
@@ -326,14 +289,11 @@ let NestAuthAuthGuard = class NestAuthAuthGuard {
326
289
  });
327
290
  }
328
291
  if (requiredRoles.length > 0) {
329
- this.debugLogger.debug('Checking required roles', 'AuthGuard', { requiredRoles, requiredGuard });
330
292
  await this.checkRoles(user, requiredRoles, requiredGuard);
331
293
  }
332
294
  if (requiredPermissions.length > 0) {
333
- this.debugLogger.debug('Checking required permissions', 'AuthGuard', { requiredPermissions });
334
295
  await this.checkPermissions(user, requiredPermissions);
335
296
  }
336
- this.debugLogger.debug('Authorization check passed', 'AuthGuard');
337
297
  }
338
298
  getRequiredPermissions(context) {
339
299
  let permissions = this.reflector.getAllAndOverride(permissions_decorator_1.PERMISSIONS_KEY, [context.getHandler(), context.getClass()]);
@@ -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;AAC9B,mFAA8E;AAiBvE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEd;IACA;IACA;IACA;IACA;IACA;IANZ,YACY,SAAoB,EACpB,UAAsB,EACtB,cAAqC,EACrC,gBAAkC,EAClC,iBAAoC,EACpC,WAA+B;QAL/B,cAAS,GAAT,SAAS,CAAW;QACpB,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAuB;QACrC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,gBAAW,GAAX,WAAW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I,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;AA/hBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAGc,gBAAS;QACR,wBAAU;QACN,+CAAqB;QACnB,qCAAgB;QACf,uCAAiB;QACvB,yCAAkB;GAPlC,iBAAiB,CA+hB7B"}
@@ -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,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAO5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,qBACa,wBAAyB,YAAW,eAAe;IAIhD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;gBAEhB,WAAW,EAAE,kBAAkB;IAK5D,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;IA0B/B,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAkDvF,SAAS,CAAC,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"}
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,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAO5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,qBACa,wBAAyB,YAAW,eAAe;IAIhD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;gBAEhB,WAAW,EAAE,kBAAkB;IAK5D,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;IA0B/B,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAkDvF,SAAS,CAAC,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;CAsBpB"}
@@ -102,11 +102,7 @@ let TokenResponseInterceptor = class TokenResponseInterceptor {
102
102
  };
103
103
  this.debugLogger.verbose(`Setting cookie: ${name}`, 'TokenResponseInterceptor', {
104
104
  cookieName: name,
105
- httpOnly: cookieOptions.httpOnly,
106
- secure: cookieOptions.secure,
107
- sameSite: cookieOptions.sameSite,
108
- maxAge: cookieOptions.maxAge,
109
- path: cookieOptions.path
105
+ ...cookieOptions
110
106
  });
111
107
  cookie_helper_1.CookieHelper.set(response, name, token, cookieOptions);
112
108
  }
@@ -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;AACxE,mFAA8E;AAGvE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAIJ;IAFZ,OAAO,CAAqB;IAE7C,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QACxD,IAAI,CAAC,OAAO,GAAG,uCAAiB,CAAC,UAAU,EAAE,CAAC;IAClD,CAAC;IAGD,cAAc,CAAC,GAAY;QACvB,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,IAAI,eAAe,KAAK,QAAQ,EAAE,CAAC;YAChE,IAAI,CAAC,WAAW,CAAC,KAAK,CAClB,sDAAsD,EACtD,0BAA0B,EAC1B,EAAE,eAAe,EAAE,CACtB,CAAC;YACF,OAAO,IAAI,CAAC;QAChB,CAAC;aAAM,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,QAAQ,EAAE,CAAC;YACnD,IAAI,CAAC,WAAW,CAAC,KAAK,CAClB,kCAAkC,EAClC,0BAA0B,EAC1B,EAAE,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACpD,CAAC;YACF,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAClB,8BAA8B,EAC9B,0BAA0B,EAC1B,EAAE,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,eAAe,EAAE,CACrE,CAAC;Q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E,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;QAC/F,MAAM,aAAa,GAAG;YAClB,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;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"}
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;AACxE,mFAA8E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O,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,GAAG,aAAa;SACnB,CACJ,CAAC;QAGF,4BAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AA9IY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAKiC,yCAAkB;GAJnD,wBAAwB,CA8IpC"}
@@ -1,3 +1,4 @@
1
+ import { OnModuleInit } from '@nestjs/common';
1
2
  import { AuthConfigService } from './auth-config.service';
2
3
  export declare enum DebugLogLevel {
3
4
  ERROR = "error",
@@ -12,15 +13,18 @@ export interface DebugLogOptions {
12
13
  prefix?: string;
13
14
  includeTimestamp?: boolean;
14
15
  includeContext?: boolean;
16
+ useConsole?: boolean;
15
17
  }
16
- export declare class DebugLoggerService {
18
+ export declare class DebugLoggerService implements OnModuleInit {
17
19
  private readonly authConfig;
18
20
  private readonly logger;
19
- private config;
21
+ private defaultConfig;
20
22
  constructor(authConfig: AuthConfigService);
21
- private updateConfig;
23
+ onModuleInit(): void;
24
+ private getConfig;
22
25
  private shouldLog;
23
26
  private formatMessage;
27
+ private logWithLevel;
24
28
  error(message: string, context?: string, data?: any, trace?: string): void;
25
29
  warn(message: string, context?: string, data?: any): void;
26
30
  info(message: string, context?: string, data?: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"debug-logger.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/services/debug-logger.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA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AC,EAAE,GAAG,GAAG,IAAI;IAQtE,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAS7F,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAQtE,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAQ1E,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAQ5E,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IASlF,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,GAAG,GAAG,IAAI;IAenE,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IAI3E,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;CAG7E"}
@@ -23,28 +23,39 @@ var DebugLogLevel;
23
23
  let DebugLoggerService = class DebugLoggerService {
24
24
  authConfig;
25
25
  logger = new common_1.Logger('NestAuth');
26
- config = {
26
+ defaultConfig = {
27
27
  enabled: false,
28
28
  level: DebugLogLevel.VERBOSE,
29
29
  prefix: '[NestAuth]',
30
30
  includeTimestamp: true,
31
- includeContext: true
31
+ includeContext: true,
32
+ useConsole: false
32
33
  };
33
34
  constructor(authConfig) {
34
35
  this.authConfig = authConfig;
35
- this.updateConfig();
36
36
  }
37
- updateConfig() {
37
+ onModuleInit() {
38
+ const config = this.getConfig();
39
+ if (config.enabled) {
40
+ console.log('\x1b[36m%s\x1b[0m', `${config.prefix || '[NestAuth]'} Debug logging ENABLED (level: ${config.level || 'verbose'})`);
41
+ console.log('\x1b[33m%s\x1b[0m', `${config.prefix || '[NestAuth]'} TIP: If you don't see debug/verbose logs, either:\n` +
42
+ ` 1. Set useConsole: true in debug config, OR\n` +
43
+ ` 2. Configure NestJS app with: new Logger({ level: 'verbose' })`);
44
+ }
45
+ }
46
+ getConfig() {
38
47
  const authOptions = this.authConfig.getConfig();
39
48
  if (authOptions.debug) {
40
- this.config = {
41
- ...this.config,
49
+ return {
50
+ ...this.defaultConfig,
42
51
  ...authOptions.debug
43
52
  };
44
53
  }
54
+ return this.defaultConfig;
45
55
  }
46
56
  shouldLog(level) {
47
- if (!this.config.enabled)
57
+ const config = this.getConfig();
58
+ if (!config.enabled)
48
59
  return false;
49
60
  const levels = [
50
61
  DebugLogLevel.ERROR,
@@ -53,19 +64,20 @@ let DebugLoggerService = class DebugLoggerService {
53
64
  DebugLogLevel.DEBUG,
54
65
  DebugLogLevel.VERBOSE
55
66
  ];
56
- const currentLevelIndex = levels.indexOf(this.config.level);
67
+ const currentLevelIndex = levels.indexOf(config.level || DebugLogLevel.VERBOSE);
57
68
  const requestedLevelIndex = levels.indexOf(level);
58
69
  return requestedLevelIndex <= currentLevelIndex;
59
70
  }
60
71
  formatMessage(message, context, data) {
72
+ const config = this.getConfig();
61
73
  let formattedMessage = '';
62
- if (this.config.prefix) {
63
- formattedMessage += `${this.config.prefix} `;
74
+ if (config.prefix) {
75
+ formattedMessage += `${config.prefix} `;
64
76
  }
65
- if (this.config.includeTimestamp) {
77
+ if (config.includeTimestamp) {
66
78
  formattedMessage += `[${new Date().toISOString()}] `;
67
79
  }
68
- if (this.config.includeContext && context) {
80
+ if (config.includeContext && context) {
69
81
  formattedMessage += `[${context}] `;
70
82
  }
71
83
  formattedMessage += message;
@@ -74,29 +86,74 @@ let DebugLoggerService = class DebugLoggerService {
74
86
  }
75
87
  return formattedMessage;
76
88
  }
89
+ logWithLevel(level, message, trace) {
90
+ const config = this.getConfig();
91
+ if (config.useConsole) {
92
+ const colorCodes = {
93
+ [DebugLogLevel.ERROR]: '\x1b[31m',
94
+ [DebugLogLevel.WARN]: '\x1b[33m',
95
+ [DebugLogLevel.INFO]: '\x1b[32m',
96
+ [DebugLogLevel.DEBUG]: '\x1b[36m',
97
+ [DebugLogLevel.VERBOSE]: '\x1b[35m'
98
+ };
99
+ const reset = '\x1b[0m';
100
+ const color = colorCodes[level] || '';
101
+ switch (level) {
102
+ case DebugLogLevel.ERROR:
103
+ console.error(`${color}[ERROR]${reset} ${message}`);
104
+ if (trace)
105
+ console.error(trace);
106
+ break;
107
+ case DebugLogLevel.WARN:
108
+ console.warn(`${color}[WARN]${reset} ${message}`);
109
+ break;
110
+ default:
111
+ console.log(`${color}[${level.toUpperCase()}]${reset} ${message}`);
112
+ }
113
+ }
114
+ else {
115
+ switch (level) {
116
+ case DebugLogLevel.ERROR:
117
+ this.logger.error(message, trace);
118
+ break;
119
+ case DebugLogLevel.WARN:
120
+ this.logger.warn(message);
121
+ break;
122
+ case DebugLogLevel.INFO:
123
+ this.logger.log(message);
124
+ break;
125
+ case DebugLogLevel.DEBUG:
126
+ this.logger.debug(message);
127
+ break;
128
+ case DebugLogLevel.VERBOSE:
129
+ this.logger.verbose(message);
130
+ break;
131
+ }
132
+ }
133
+ }
77
134
  error(message, context, data, trace) {
78
135
  if (this.shouldLog(DebugLogLevel.ERROR)) {
79
- this.logger.error(this.formatMessage(message, context, data), trace);
136
+ this.logWithLevel(DebugLogLevel.ERROR, this.formatMessage(message, context, data), trace);
80
137
  }
81
138
  }
82
139
  warn(message, context, data) {
83
140
  if (this.shouldLog(DebugLogLevel.WARN)) {
84
- this.logger.warn(this.formatMessage(message, context, data));
141
+ this.logWithLevel(DebugLogLevel.WARN, this.formatMessage(message, context, data));
85
142
  }
86
143
  }
87
144
  info(message, context, data) {
88
145
  if (this.shouldLog(DebugLogLevel.INFO)) {
89
- this.logger.log(this.formatMessage(message, context, data));
146
+ this.logWithLevel(DebugLogLevel.INFO, this.formatMessage(message, context, data));
90
147
  }
91
148
  }
92
149
  debug(message, context, data) {
93
150
  if (this.shouldLog(DebugLogLevel.DEBUG)) {
94
- this.logger.debug(this.formatMessage(message, context, data));
151
+ this.logWithLevel(DebugLogLevel.DEBUG, this.formatMessage(message, context, data));
95
152
  }
96
153
  }
97
154
  verbose(message, context, data) {
98
155
  if (this.shouldLog(DebugLogLevel.VERBOSE)) {
99
- this.logger.verbose(this.formatMessage(message, context, data));
156
+ this.logWithLevel(DebugLogLevel.VERBOSE, this.formatMessage(message, context, data));
100
157
  }
101
158
  }
102
159
  logUserOperation(operation, userId, data) {
@@ -1 +1 @@
1
- {"version":3,"file":"debug-logger.service.js","sourceRoot":"","sources":["../../../../src/lib/core/services/debug-logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoD;AACpD,+DAA0D;AAE1D,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACvB,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB;AAWM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAUE;IATZ,MAAM,GAAG,IAAI,eAAM,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,GAAoB;QAC9B,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,aAAa,CAAC,OAAO;QAC5B,MAAM,EAAE,YAAY;QACpB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;KACvB,CAAC;IAEF,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;QACtD,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAEO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IAED,sBAAsB,CAAC,SAAiB,EAAE,YAAqB,EAAE,IAAU;QACvE,IAAI,CAAC,KAAK,CAAC,yBAAyB,SAAS,EAAE,EAAE,mBAAmB,EAAE;YAClE,SAAS;YACT,YAAY;YACZ,GAAG,IAAI;SACV,CAAC,CAAC;IACP,CAAC;IAGD,QAAQ,CAAC,KAAY,EAAE,OAAe,EAAE,cAAoB;QACxD,IAAI,CAAC,KAAK,CACN,YAAY,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,EACvC,OAAO,EACP;YACI,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,cAAc;SACpB,EACD,KAAK,CAAC,KAAK,CACd,CAAC;IACN,CAAC;IAGD,gBAAgB,CAAC,YAAoB,EAAE,OAAe,EAAE,MAAY;QAChE,IAAI,CAAC,OAAO,CAAC,sBAAsB,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe,CAAC,YAAoB,EAAE,OAAe,EAAE,MAAY;QAC/D,IAAI,CAAC,OAAO,CAAC,qBAAqB,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AAxKY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAWgC,uCAAiB;GAVjD,kBAAkB,CAwK9B"}
1
+ {"version":3,"file":"debug-logger.service.js","sourceRoot":"","sources":["../../../../src/lib/core/services/debug-logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAkE;AAClE,+DAA0D;AAE1D,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACvB,CAAC,EANW,aAAa,6BAAb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AAsB,SAAS,EAAE,EAAE,gBAAgB,EAAE;YAC5D,SAAS;YACT,SAAS;YACT,GAAG,IAAI;SACV,CAAC,CAAC;IACP,CAAC;IAED,sBAAsB,CAAC,SAAiB,EAAE,YAAqB,EAAE,IAAU;QACvE,IAAI,CAAC,KAAK,CAAC,yBAAyB,SAAS,EAAE,EAAE,mBAAmB,EAAE;YAClE,SAAS;YACT,YAAY;YACZ,GAAG,IAAI;SACV,CAAC,CAAC;IACP,CAAC;IAGD,QAAQ,CAAC,KAAY,EAAE,OAAe,EAAE,cAAoB;QACxD,IAAI,CAAC,KAAK,CACN,YAAY,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,EACvC,OAAO,EACP;YACI,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,cAAc;SACpB,EACD,KAAK,CAAC,KAAK,CACd,CAAC;IACN,CAAC;IAGD,gBAAgB,CAAC,YAAoB,EAAE,OAAe,EAAE,MAAY;QAChE,IAAI,CAAC,OAAO,CAAC,sBAAsB,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe,CAAC,YAAoB,EAAE,OAAe,EAAE,MAAY;QAC/D,IAAI,CAAC,OAAO,CAAC,qBAAqB,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AAvPY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAYgC,uCAAiB;GAXjD,kBAAkB,CAuP9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ackplus/nest-auth",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
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.39"
42
+ "@ackplus/nest-auth-contracts": "1.1.41"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@nestjs/common": "^10 || ^11",