@mesob/auth-react 0.3.5 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-35TCGAW3.js +98 -0
- package/dist/chunk-35TCGAW3.js.map +1 -0
- package/dist/chunk-3BZC4VVD.js +36 -0
- package/dist/chunk-3BZC4VVD.js.map +1 -0
- package/dist/chunk-45UCLKH2.js +188 -0
- package/dist/chunk-45UCLKH2.js.map +1 -0
- package/dist/chunk-55BMNC4S.js +115 -0
- package/dist/chunk-55BMNC4S.js.map +1 -0
- package/dist/chunk-5F5FZMHE.js +94 -0
- package/dist/chunk-5F5FZMHE.js.map +1 -0
- package/dist/chunk-5M7I7WNH.js +31 -0
- package/dist/chunk-5M7I7WNH.js.map +1 -0
- package/dist/chunk-72YRO3A7.js +288 -0
- package/dist/chunk-72YRO3A7.js.map +1 -0
- package/dist/chunk-7KXTL6NT.js +48 -0
- package/dist/chunk-7KXTL6NT.js.map +1 -0
- package/dist/chunk-AIMD6R6U.js +466 -0
- package/dist/chunk-AIMD6R6U.js.map +1 -0
- package/dist/chunk-BGSHXIHI.js +953 -0
- package/dist/chunk-BGSHXIHI.js.map +1 -0
- package/dist/chunk-BZ42QPXE.js +271 -0
- package/dist/chunk-BZ42QPXE.js.map +1 -0
- package/dist/chunk-C26NPUPI.js +272 -0
- package/dist/chunk-C26NPUPI.js.map +1 -0
- package/dist/chunk-C2KFZ57H.js +194 -0
- package/dist/chunk-C2KFZ57H.js.map +1 -0
- package/dist/chunk-C5ZW7FD2.js +46 -0
- package/dist/chunk-C5ZW7FD2.js.map +1 -0
- package/dist/chunk-DPH2PHK3.js +32 -0
- package/dist/chunk-DPH2PHK3.js.map +1 -0
- package/dist/chunk-EQ4346FE.js +139 -0
- package/dist/chunk-EQ4346FE.js.map +1 -0
- package/dist/chunk-FAHN63DA.js +535 -0
- package/dist/chunk-FAHN63DA.js.map +1 -0
- package/dist/chunk-FBABIA5J.js +345 -0
- package/dist/chunk-FBABIA5J.js.map +1 -0
- package/dist/chunk-FFR5UHTS.js +99 -0
- package/dist/chunk-FFR5UHTS.js.map +1 -0
- package/dist/chunk-FHOLUOOZ.js +164 -0
- package/dist/chunk-FHOLUOOZ.js.map +1 -0
- package/dist/chunk-G2AW2H36.js +11 -0
- package/dist/chunk-G2AW2H36.js.map +1 -0
- package/dist/chunk-G7SCXCCM.js +89 -0
- package/dist/chunk-G7SCXCCM.js.map +1 -0
- package/dist/chunk-GP7GIUI3.js +64 -0
- package/dist/chunk-GP7GIUI3.js.map +1 -0
- package/dist/chunk-GRT6EBR6.js +93 -0
- package/dist/chunk-GRT6EBR6.js.map +1 -0
- package/dist/chunk-GXKBVCVS.js +102 -0
- package/dist/chunk-GXKBVCVS.js.map +1 -0
- package/dist/chunk-HOO2VLNM.js +305 -0
- package/dist/chunk-HOO2VLNM.js.map +1 -0
- package/dist/chunk-II5MLBSB.js +183 -0
- package/dist/chunk-II5MLBSB.js.map +1 -0
- package/dist/chunk-ISNNPMF7.js +95 -0
- package/dist/chunk-ISNNPMF7.js.map +1 -0
- package/dist/chunk-JB6XVST4.js +141 -0
- package/dist/chunk-JB6XVST4.js.map +1 -0
- package/dist/chunk-JUHBVG5Q.js +303 -0
- package/dist/chunk-JUHBVG5Q.js.map +1 -0
- package/dist/chunk-JZZJCBAE.js +118 -0
- package/dist/chunk-JZZJCBAE.js.map +1 -0
- package/dist/chunk-KWG4DSB5.js +55 -0
- package/dist/chunk-KWG4DSB5.js.map +1 -0
- package/dist/chunk-L4CGIO2I.js +265 -0
- package/dist/chunk-L4CGIO2I.js.map +1 -0
- package/dist/chunk-LNG736CV.js +19 -0
- package/dist/chunk-LNG736CV.js.map +1 -0
- package/dist/chunk-LSYKVFJA.js +98 -0
- package/dist/chunk-LSYKVFJA.js.map +1 -0
- package/dist/chunk-LZR4YUDV.js +107 -0
- package/dist/chunk-LZR4YUDV.js.map +1 -0
- package/dist/chunk-MELNS4QH.js +255 -0
- package/dist/chunk-MELNS4QH.js.map +1 -0
- package/dist/chunk-MS2JUZ3N.js +94 -0
- package/dist/chunk-MS2JUZ3N.js.map +1 -0
- package/dist/chunk-NEO72TMH.js +32 -0
- package/dist/chunk-NEO72TMH.js.map +1 -0
- package/dist/chunk-NJPNTAAT.js +68 -0
- package/dist/chunk-NJPNTAAT.js.map +1 -0
- package/dist/chunk-NPW7D2HZ.js +16 -0
- package/dist/chunk-NPW7D2HZ.js.map +1 -0
- package/dist/chunk-OAN4EXU4.js +310 -0
- package/dist/chunk-OAN4EXU4.js.map +1 -0
- package/dist/chunk-OFLSINVU.js +138 -0
- package/dist/chunk-OFLSINVU.js.map +1 -0
- package/dist/chunk-OHIIMUQC.js +286 -0
- package/dist/chunk-OHIIMUQC.js.map +1 -0
- package/dist/chunk-OQGJX37L.js +239 -0
- package/dist/chunk-OQGJX37L.js.map +1 -0
- package/dist/chunk-OYHH7HQG.js +65 -0
- package/dist/chunk-OYHH7HQG.js.map +1 -0
- package/dist/chunk-PSRIZMWJ.js +486 -0
- package/dist/chunk-PSRIZMWJ.js.map +1 -0
- package/dist/chunk-QNCE2B5O.js +23 -0
- package/dist/chunk-QNCE2B5O.js.map +1 -0
- package/dist/chunk-RLPZFLAS.js +23 -0
- package/dist/chunk-RLPZFLAS.js.map +1 -0
- package/dist/chunk-RT5C7IAE.js +38 -0
- package/dist/chunk-RT5C7IAE.js.map +1 -0
- package/dist/chunk-S3CXCCKL.js +272 -0
- package/dist/chunk-S3CXCCKL.js.map +1 -0
- package/dist/chunk-SOCZK4CV.js +69 -0
- package/dist/chunk-SOCZK4CV.js.map +1 -0
- package/dist/chunk-T6P7UHVP.js +34 -0
- package/dist/chunk-T6P7UHVP.js.map +1 -0
- package/dist/chunk-TFVBER3Y.js +52 -0
- package/dist/chunk-TFVBER3Y.js.map +1 -0
- package/dist/chunk-UXOZ2TME.js +104 -0
- package/dist/chunk-UXOZ2TME.js.map +1 -0
- package/dist/chunk-V2W3WPCZ.js +22 -0
- package/dist/chunk-V2W3WPCZ.js.map +1 -0
- package/dist/chunk-YZ264S2L.js +286 -0
- package/dist/chunk-YZ264S2L.js.map +1 -0
- package/dist/chunk-ZESFGO3K.js +28 -0
- package/dist/chunk-ZESFGO3K.js.map +1 -0
- package/dist/chunk-ZG6WFZHX.js +143 -0
- package/dist/chunk-ZG6WFZHX.js.map +1 -0
- package/dist/components/auth/auth-card.d.ts +3 -6
- package/dist/components/auth/auth-card.js +3 -7
- package/dist/components/auth/auth-card.js.map +1 -1
- package/dist/components/auth/auth-layout.d.ts +3 -6
- package/dist/components/auth/auth-layout.js +3 -28
- package/dist/components/auth/auth-layout.js.map +1 -1
- package/dist/components/auth/countdown.d.ts +2 -5
- package/dist/components/auth/countdown.js +5 -130
- package/dist/components/auth/countdown.js.map +1 -1
- package/dist/components/auth/forgot-password.d.ts +1 -5
- package/dist/components/auth/forgot-password.js +6 -361
- package/dist/components/auth/forgot-password.js.map +1 -1
- package/dist/components/auth/reset-password-form.d.ts +2 -5
- package/dist/components/auth/reset-password-form.js +6 -483
- package/dist/components/auth/reset-password-form.js.map +1 -1
- package/dist/components/auth/set-password.d.ts +6 -0
- package/dist/components/auth/set-password.js +13 -0
- package/dist/components/auth/set-password.js.map +1 -0
- package/dist/components/auth/sign-in.d.ts +2 -5
- package/dist/components/auth/sign-in.js +7 -540
- package/dist/components/auth/sign-in.js.map +1 -1
- package/dist/components/auth/sign-up.d.ts +2 -5
- package/dist/components/auth/sign-up.js +6 -509
- package/dist/components/auth/sign-up.js.map +1 -1
- package/dist/components/auth/verification-form.d.ts +13 -2
- package/dist/components/auth/verification-form.js +5 -217
- package/dist/components/auth/verification-form.js.map +1 -1
- package/dist/components/auth/verify-email.d.ts +2 -5
- package/dist/components/auth/verify-email.js +8 -523
- package/dist/components/auth/verify-email.js.map +1 -1
- package/dist/components/auth/verify-phone.d.ts +2 -5
- package/dist/components/auth/verify-phone.js +8 -528
- package/dist/components/auth/verify-phone.js.map +1 -1
- package/dist/components/authorization/deny.d.ts +8 -0
- package/dist/components/authorization/deny.js +9 -0
- package/dist/components/authorization/deny.js.map +1 -0
- package/dist/components/authorization/grant.d.ts +9 -0
- package/dist/components/authorization/grant.js +9 -0
- package/dist/components/authorization/grant.js.map +1 -0
- package/dist/components/error-boundary.d.ts +6 -10
- package/dist/components/error-boundary.js +4 -43
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/iam/permission-selector.d.ts +16 -0
- package/dist/components/iam/permission-selector.js +9 -0
- package/dist/components/iam/permission-selector.js.map +1 -0
- package/dist/components/iam/permissions-page.d.ts +1 -0
- package/dist/components/iam/permissions-page.js +10 -0
- package/dist/components/iam/permissions-page.js.map +1 -0
- package/dist/components/iam/permissions.d.ts +1 -5
- package/dist/components/iam/permissions.js +5 -217
- package/dist/components/iam/permissions.js.map +1 -1
- package/dist/components/iam/role-detail-layout.d.ts +8 -0
- package/dist/components/iam/role-detail-layout.js +9 -0
- package/dist/components/iam/role-detail-layout.js.map +1 -0
- package/dist/components/iam/role-detail-page.d.ts +6 -0
- package/dist/components/iam/role-detail-page.js +9 -0
- package/dist/components/iam/role-detail-page.js.map +1 -0
- package/dist/components/iam/role-permissions-page.d.ts +5 -0
- package/dist/components/iam/role-permissions-page.js +10 -0
- package/dist/components/iam/role-permissions-page.js.map +1 -0
- package/dist/components/iam/roles-page.d.ts +1 -0
- package/dist/components/iam/roles-page.js +13 -0
- package/dist/components/iam/roles-page.js.map +1 -0
- package/dist/components/iam/roles.d.ts +1 -5
- package/dist/components/iam/roles.js +5 -215
- package/dist/components/iam/roles.js.map +1 -1
- package/dist/components/iam/sessions-page.d.ts +1 -0
- package/dist/components/iam/sessions-page.js +12 -0
- package/dist/components/iam/sessions-page.js.map +1 -0
- package/dist/components/iam/sessions.d.ts +1 -5
- package/dist/components/iam/sessions.js +5 -198
- package/dist/components/iam/sessions.js.map +1 -1
- package/dist/components/iam/tenants-page.d.ts +1 -0
- package/dist/components/iam/tenants-page.js +13 -0
- package/dist/components/iam/tenants-page.js.map +1 -0
- package/dist/components/iam/tenants.d.ts +1 -5
- package/dist/components/iam/tenants.js +5 -204
- package/dist/components/iam/tenants.js.map +1 -1
- package/dist/components/iam/users-page.d.ts +1 -0
- package/dist/components/iam/users-page.js +13 -0
- package/dist/components/iam/users-page.js.map +1 -0
- package/dist/components/iam/users.d.ts +1 -5
- package/dist/components/iam/users.js +5 -213
- package/dist/components/iam/users.js.map +1 -1
- package/dist/components/profile/account.d.ts +1 -5
- package/dist/components/profile/account.js +5 -61
- package/dist/components/profile/account.js.map +1 -1
- package/dist/components/profile/change-email-form.d.ts +1 -5
- package/dist/components/profile/change-email-form.js +9 -735
- package/dist/components/profile/change-email-form.js.map +1 -1
- package/dist/components/profile/change-password-form.d.ts +1 -5
- package/dist/components/profile/change-password-form.js +3 -262
- package/dist/components/profile/change-password-form.js.map +1 -1
- package/dist/components/profile/change-phone-form.d.ts +1 -5
- package/dist/components/profile/change-phone-form.js +10 -772
- package/dist/components/profile/change-phone-form.js.map +1 -1
- package/dist/components/profile/change-profile.d.ts +3 -6
- package/dist/components/profile/change-profile.js +2 -32
- package/dist/components/profile/change-profile.js.map +1 -1
- package/dist/components/profile/otp-verification-modal.d.ts +2 -5
- package/dist/components/profile/otp-verification-modal.js +6 -266
- package/dist/components/profile/otp-verification-modal.js.map +1 -1
- package/dist/components/profile/profile-layout.d.ts +4 -0
- package/dist/components/profile/profile-layout.js +10 -0
- package/dist/components/profile/profile-layout.js.map +1 -0
- package/dist/components/profile/request-change-email-form.d.ts +2 -5
- package/dist/components/profile/request-change-email-form.js +4 -285
- package/dist/components/profile/request-change-email-form.js.map +1 -1
- package/dist/components/profile/request-change-phone-form.d.ts +2 -5
- package/dist/components/profile/request-change-phone-form.js +5 -323
- package/dist/components/profile/request-change-phone-form.js.map +1 -1
- package/dist/components/profile/security.d.ts +1 -5
- package/dist/components/profile/security.js +15 -1474
- package/dist/components/profile/security.js.map +1 -1
- package/dist/components/profile/verify-change-email-form.d.ts +2 -5
- package/dist/components/profile/verify-change-email-form.js +7 -407
- package/dist/components/profile/verify-change-email-form.js.map +1 -1
- package/dist/components/profile/verify-change-phone-form.d.ts +2 -5
- package/dist/components/profile/verify-change-phone-form.js +7 -411
- package/dist/components/profile/verify-change-phone-form.js.map +1 -1
- package/dist/components/shared/data-table.d.ts +5 -8
- package/dist/components/shared/data-table.js +3 -79
- package/dist/components/shared/data-table.js.map +1 -1
- package/dist/components/skeletons/auth-form-skeleton.d.ts +1 -5
- package/dist/components/skeletons/auth-form-skeleton.js +3 -27
- package/dist/components/skeletons/auth-form-skeleton.js.map +1 -1
- package/dist/components/skeletons/profile-skeleton.d.ts +1 -5
- package/dist/components/skeletons/profile-skeleton.js +3 -28
- package/dist/components/skeletons/profile-skeleton.js.map +1 -1
- package/dist/components/skeletons/table-skeleton.d.ts +2 -5
- package/dist/components/skeletons/table-skeleton.js +3 -34
- package/dist/components/skeletons/table-skeleton.js.map +1 -1
- package/dist/constants/auth.error.codes.d.ts +5 -0
- package/dist/hooks/use-session-cookie-name.d.ts +1 -0
- package/dist/hooks/use-translator.d.ts +1 -0
- package/dist/index.d.ts +50 -84
- package/dist/index.js +160 -3861
- package/dist/index.js.map +1 -1
- package/dist/lib/query-options.d.ts +10 -0
- package/dist/lib/translations.d.ts +3 -0
- package/dist/pages/auth/forgot-password.d.ts +3 -0
- package/dist/pages/auth/forgot-password.js +22 -0
- package/dist/pages/auth/forgot-password.js.map +1 -0
- package/dist/pages/auth/layout.d.ts +4 -0
- package/dist/pages/auth/layout.js +39 -0
- package/dist/pages/auth/layout.js.map +1 -0
- package/dist/pages/auth/reset-password.d.ts +7 -0
- package/dist/pages/auth/reset-password.js +33 -0
- package/dist/pages/auth/reset-password.js.map +1 -0
- package/dist/pages/auth/set-password.d.ts +7 -0
- package/dist/pages/auth/set-password.js +28 -0
- package/dist/pages/auth/set-password.js.map +1 -0
- package/dist/pages/auth/sign-in.d.ts +7 -0
- package/dist/pages/auth/sign-in.js +26 -0
- package/dist/pages/auth/sign-in.js.map +1 -0
- package/dist/pages/auth/sign-up.d.ts +7 -0
- package/dist/pages/auth/sign-up.js +33 -0
- package/dist/pages/auth/sign-up.js.map +1 -0
- package/dist/pages/auth/verify-email.d.ts +7 -0
- package/dist/pages/auth/verify-email.js +38 -0
- package/dist/pages/auth/verify-email.js.map +1 -0
- package/dist/pages/auth/verify-phone.d.ts +7 -0
- package/dist/pages/auth/verify-phone.js +47 -0
- package/dist/pages/auth/verify-phone.js.map +1 -0
- package/dist/pages/iam/permissions/_components/permission-card.d.ts +6 -0
- package/dist/pages/iam/permissions/_components/permissions-data.d.ts +7 -0
- package/dist/pages/iam/permissions/_components/permissions-list.d.ts +14 -0
- package/dist/pages/iam/permissions.d.ts +1 -0
- package/dist/pages/iam/permissions.js +10 -0
- package/dist/pages/iam/permissions.js.map +1 -0
- package/dist/pages/iam/role-detail-layout.d.ts +9 -0
- package/dist/pages/iam/role-detail-layout.js +18 -0
- package/dist/pages/iam/role-detail-layout.js.map +1 -0
- package/dist/pages/iam/role-detail.d.ts +9 -0
- package/dist/pages/iam/role-detail.js +22 -0
- package/dist/pages/iam/role-detail.js.map +1 -0
- package/dist/pages/iam/role-permissions.d.ts +9 -0
- package/dist/pages/iam/role-permissions.js +23 -0
- package/dist/pages/iam/role-permissions.js.map +1 -0
- package/dist/pages/iam/role-users.d.ts +9 -0
- package/dist/pages/iam/role-users.js +26 -0
- package/dist/pages/iam/role-users.js.map +1 -0
- package/dist/pages/iam/roles/_components/role-card.d.ts +7 -0
- package/dist/pages/iam/roles/_components/role-form.d.ts +9 -0
- package/dist/pages/iam/roles/_components/role-selector.d.ts +11 -0
- package/dist/pages/iam/roles/_components/roles-data.d.ts +16 -0
- package/dist/pages/iam/roles/_components/roles-list.d.ts +15 -0
- package/dist/pages/iam/roles/users/_components/role-users-page.d.ts +5 -0
- package/dist/pages/iam/roles.d.ts +1 -0
- package/dist/pages/iam/roles.js +13 -0
- package/dist/pages/iam/roles.js.map +1 -0
- package/dist/pages/iam/sessions/_components/session-card.d.ts +6 -0
- package/dist/pages/iam/sessions/_components/sessions-data.d.ts +7 -0
- package/dist/pages/iam/sessions/_components/sessions-list.d.ts +14 -0
- package/dist/pages/iam/sessions.d.ts +1 -0
- package/dist/pages/iam/sessions.js +12 -0
- package/dist/pages/iam/sessions.js.map +1 -0
- package/dist/pages/iam/shared/navigation.d.ts +8 -0
- package/dist/pages/iam/shared/page-helpers.d.ts +12 -0
- package/dist/pages/iam/tenant-detail.d.ts +7 -0
- package/dist/pages/iam/tenant-detail.js +18 -0
- package/dist/pages/iam/tenant-detail.js.map +1 -0
- package/dist/pages/iam/tenants/_components/tenant-card.d.ts +6 -0
- package/dist/pages/iam/tenants/_components/tenant-form.d.ts +9 -0
- package/dist/pages/iam/tenants/_components/tenant-selector.d.ts +13 -0
- package/dist/pages/iam/tenants/_components/tenants-data.d.ts +12 -0
- package/dist/pages/iam/tenants/_components/tenants-list.d.ts +15 -0
- package/dist/pages/iam/tenants/tenant-detail-page-content.d.ts +5 -0
- package/dist/pages/iam/tenants.d.ts +1 -0
- package/dist/pages/iam/tenants.js +13 -0
- package/dist/pages/iam/tenants.js.map +1 -0
- package/dist/pages/iam/user-activity.d.ts +7 -0
- package/dist/pages/iam/user-activity.js +21 -0
- package/dist/pages/iam/user-activity.js.map +1 -0
- package/dist/pages/iam/user-detail-layout.d.ts +9 -0
- package/dist/pages/iam/user-detail-layout.js +18 -0
- package/dist/pages/iam/user-detail-layout.js.map +1 -0
- package/dist/pages/iam/user-detail.d.ts +7 -0
- package/dist/pages/iam/user-detail.js +15 -0
- package/dist/pages/iam/user-detail.js.map +1 -0
- package/dist/pages/iam/users/_components/bulk-invite-user-form.d.ts +6 -0
- package/dist/pages/iam/users/_components/invite-user-form.d.ts +6 -0
- package/dist/pages/iam/users/_components/invite-user-shared.d.ts +25 -0
- package/dist/pages/iam/users/_components/user-card.d.ts +6 -0
- package/dist/pages/iam/users/_components/user-detail-layout-content.d.ts +6 -0
- package/dist/pages/iam/users/_components/user-detail-page-content.d.ts +5 -0
- package/dist/pages/iam/users/_components/user-form.d.ts +9 -0
- package/dist/pages/iam/users/_components/user-selector.d.ts +12 -0
- package/dist/pages/iam/users/_components/users-data.d.ts +22 -0
- package/dist/pages/iam/users/_components/users-list.d.ts +15 -0
- package/dist/pages/iam/users/activity/_components/role-section.d.ts +3 -0
- package/dist/pages/iam/users/activity/user-activity-page-content.d.ts +5 -0
- package/dist/pages/iam/users.d.ts +1 -0
- package/dist/pages/iam/users.js +13 -0
- package/dist/pages/iam/users.js.map +1 -0
- package/dist/pages/profile/_components/profile-sidebar.d.ts +1 -0
- package/dist/pages/profile/account.d.ts +1 -0
- package/dist/pages/profile/account.js +33 -0
- package/dist/pages/profile/account.js.map +1 -0
- package/dist/pages/profile/layout.d.ts +1 -0
- package/dist/pages/profile/layout.js +10 -0
- package/dist/pages/profile/layout.js.map +1 -0
- package/dist/pages/profile/security.d.ts +1 -0
- package/dist/pages/profile/security.js +44 -0
- package/dist/pages/profile/security.js.map +1 -0
- package/dist/provider.d.ts +53 -0
- package/dist/types.d.ts +96 -0
- package/dist/utils/cookie.d.ts +2 -0
- package/dist/utils/custom-fetch.d.ts +2 -0
- package/dist/utils/handle-error.d.ts +7 -0
- package/dist/utils/normalize-phone.d.ts +1 -0
- package/package.json +103 -4
- package/dist/types-vcfvnAzQ.d.ts +0 -69
- package/dist/verification-form-ipSRTtQB.d.ts +0 -22
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Security
|
|
4
|
+
} from "../../chunk-OYHH7HQG.js";
|
|
5
|
+
import "../../chunk-5F5FZMHE.js";
|
|
6
|
+
import "../../chunk-ZG6WFZHX.js";
|
|
7
|
+
import "../../chunk-C26NPUPI.js";
|
|
8
|
+
import "../../chunk-MS2JUZ3N.js";
|
|
9
|
+
import "../../chunk-MELNS4QH.js";
|
|
10
|
+
import "../../chunk-EQ4346FE.js";
|
|
11
|
+
import "../../chunk-KWG4DSB5.js";
|
|
12
|
+
import "../../chunk-OQGJX37L.js";
|
|
13
|
+
import "../../chunk-FFR5UHTS.js";
|
|
14
|
+
import "../../chunk-GP7GIUI3.js";
|
|
15
|
+
import "../../chunk-V2W3WPCZ.js";
|
|
16
|
+
import "../../chunk-QNCE2B5O.js";
|
|
17
|
+
import "../../chunk-72YRO3A7.js";
|
|
18
|
+
|
|
19
|
+
// src/pages/profile/security.tsx
|
|
20
|
+
import {
|
|
21
|
+
PageBody,
|
|
22
|
+
PageContainer,
|
|
23
|
+
PageTitle,
|
|
24
|
+
useBreadcrumbs
|
|
25
|
+
} from "@mesob/ui/components";
|
|
26
|
+
import { IconShieldLock } from "@tabler/icons-react";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
function ProfileSecurityPage() {
|
|
29
|
+
useBreadcrumbs({
|
|
30
|
+
items: [
|
|
31
|
+
{ label: "Home", href: "/dashboard" },
|
|
32
|
+
{ label: "Profile", href: "/profile/security" },
|
|
33
|
+
{ label: "Security" }
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ jsxs(PageContainer, { className: "flex flex-1 flex-col overflow-auto p-4 pt-0 lg:p-6 lg:pt-0", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(PageTitle, { icon: /* @__PURE__ */ jsx(IconShieldLock, { className: "size-5" }), children: "Security" }),
|
|
38
|
+
/* @__PURE__ */ jsx(PageBody, { className: "px-0 pb-6", children: /* @__PURE__ */ jsx(Security, {}) })
|
|
39
|
+
] });
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
ProfileSecurityPage as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/pages/profile/security.tsx"],"sourcesContent":["'use client';\n\nimport {\n PageBody,\n PageContainer,\n PageTitle,\n useBreadcrumbs,\n} from '@mesob/ui/components';\nimport { IconShieldLock } from '@tabler/icons-react';\nimport { Security } from '../../components/profile/security';\n\nexport default function ProfileSecurityPage() {\n useBreadcrumbs({\n items: [\n { label: 'Home', href: '/dashboard' },\n { label: 'Profile', href: '/profile/security' },\n { label: 'Security' },\n ],\n });\n\n return (\n <PageContainer className=\"flex flex-1 flex-col overflow-auto p-4 pt-0 lg:p-6 lg:pt-0\">\n <PageTitle icon={<IconShieldLock className=\"size-5\" />}>\n Security\n </PageTitle>\n <PageBody className=\"px-0 pb-6\">\n <Security />\n </PageBody>\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAa3B,SACmB,KADnB;AAVW,SAAR,sBAAuC;AAC5C,iBAAe;AAAA,IACb,OAAO;AAAA,MACL,EAAE,OAAO,QAAQ,MAAM,aAAa;AAAA,MACpC,EAAE,OAAO,WAAW,MAAM,oBAAoB;AAAA,MAC9C,EAAE,OAAO,WAAW;AAAA,IACtB;AAAA,EACF,CAAC;AAED,SACE,qBAAC,iBAAc,WAAU,8DACvB;AAAA,wBAAC,aAAU,MAAM,oBAAC,kBAAe,WAAU,UAAS,GAAI,sBAExD;AAAA,IACA,oBAAC,YAAS,WAAU,aAClB,8BAAC,YAAS,GACZ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type AuthClientConfig, type AuthResponse, type Session, type User } from './types';
|
|
3
|
+
type OpenApiHooks = any;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Cookie is httpOnly and cannot be read client-side.
|
|
6
|
+
* Use `useSession().isAuthenticated` instead.
|
|
7
|
+
* This function always returns false on client.
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasAuthCookie(_cookieName: string): boolean;
|
|
10
|
+
export type AuthStatus = 'loading' | 'authenticated' | 'unauthenticated';
|
|
11
|
+
type AuthState = {
|
|
12
|
+
user: User | null;
|
|
13
|
+
session: Session | null;
|
|
14
|
+
status: AuthStatus;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
};
|
|
17
|
+
type SessionContextValue = AuthState & {
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
isAuthenticated: boolean;
|
|
20
|
+
refresh: () => Promise<void>;
|
|
21
|
+
signOut: () => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
type ApiContextValue = {
|
|
24
|
+
hooks: OpenApiHooks;
|
|
25
|
+
setAuth: (auth: AuthResponse) => void;
|
|
26
|
+
clearAuth: () => void;
|
|
27
|
+
refresh: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
type ConfigContextValue = {
|
|
30
|
+
config: AuthClientConfig;
|
|
31
|
+
cookieName: string;
|
|
32
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get session state including user, session, and auth status.
|
|
36
|
+
* - `status`: 'loading' | 'authenticated' | 'unauthenticated'
|
|
37
|
+
* - `isLoading`: true while fetching session
|
|
38
|
+
* - `isAuthenticated`: true if user and session exist
|
|
39
|
+
*/
|
|
40
|
+
export declare function useSession(): SessionContextValue;
|
|
41
|
+
export declare function useApi(): ApiContextValue;
|
|
42
|
+
export declare function useConfig(): ConfigContextValue;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Cookie is httpOnly, can't be checked client-side.
|
|
45
|
+
* Use `useSession().isAuthenticated` instead.
|
|
46
|
+
*/
|
|
47
|
+
export declare function useHasAuthCookie(): boolean;
|
|
48
|
+
type MesobAuthProviderProps = {
|
|
49
|
+
config: AuthClientConfig;
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
};
|
|
52
|
+
export declare function MesobAuthProvider({ config, children, }: MesobAuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { PermissionTree } from '@mesob/common';
|
|
2
|
+
export type UIConfig = {
|
|
3
|
+
logo: React.ReactNode;
|
|
4
|
+
name: React.ReactNode;
|
|
5
|
+
logoImage?: string;
|
|
6
|
+
};
|
|
7
|
+
export type FeaturesConfig = {
|
|
8
|
+
enableSignup?: boolean;
|
|
9
|
+
enablePasswordReset?: boolean;
|
|
10
|
+
enableEmailSignup?: boolean;
|
|
11
|
+
enablePhoneSignup?: boolean;
|
|
12
|
+
enableSocialSignup?: boolean;
|
|
13
|
+
socialProviders?: string[];
|
|
14
|
+
};
|
|
15
|
+
export type TenantConfig = {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
};
|
|
19
|
+
export type NavigationConfig = {
|
|
20
|
+
locale?: string;
|
|
21
|
+
defaultRedirectUrl?: string;
|
|
22
|
+
onNavigate?: (path: string) => void;
|
|
23
|
+
linkComponent?: React.ComponentType<React.ComponentProps<'a'> & {
|
|
24
|
+
href: string;
|
|
25
|
+
}>;
|
|
26
|
+
links?: {
|
|
27
|
+
signIn?: string;
|
|
28
|
+
signUp?: string;
|
|
29
|
+
forgotPassword?: string;
|
|
30
|
+
setPassword?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type AuthClientConfig = {
|
|
34
|
+
baseURL: string;
|
|
35
|
+
ui: UIConfig;
|
|
36
|
+
features?: FeaturesConfig;
|
|
37
|
+
tenant?: TenantConfig;
|
|
38
|
+
permissions?: PermissionTree;
|
|
39
|
+
navigation?: NavigationConfig;
|
|
40
|
+
messages?: Record<string, unknown>;
|
|
41
|
+
cookiePrefix?: string;
|
|
42
|
+
phoneRegex?: RegExp | string;
|
|
43
|
+
};
|
|
44
|
+
type DefaultAuthClientConfig = {
|
|
45
|
+
readonly features: {
|
|
46
|
+
readonly enableSignup: true;
|
|
47
|
+
readonly enablePasswordReset: true;
|
|
48
|
+
readonly enableEmailSignup: true;
|
|
49
|
+
readonly enablePhoneSignup: true;
|
|
50
|
+
readonly enableSocialSignup: false;
|
|
51
|
+
readonly socialProviders: [];
|
|
52
|
+
};
|
|
53
|
+
readonly navigation: {
|
|
54
|
+
readonly locale: 'en';
|
|
55
|
+
};
|
|
56
|
+
readonly cookiePrefix: 'msb';
|
|
57
|
+
readonly phoneRegex: RegExp;
|
|
58
|
+
};
|
|
59
|
+
export declare const defaultAuthClientConfig: DefaultAuthClientConfig;
|
|
60
|
+
export type User = {
|
|
61
|
+
id: string;
|
|
62
|
+
tenantId: string;
|
|
63
|
+
fullName: string;
|
|
64
|
+
email: string | null;
|
|
65
|
+
phone: string | null;
|
|
66
|
+
handle?: string;
|
|
67
|
+
image: string | null;
|
|
68
|
+
emailVerified: boolean;
|
|
69
|
+
phoneVerified: boolean;
|
|
70
|
+
lastSignInAt?: string | null;
|
|
71
|
+
/** Role IDs */
|
|
72
|
+
roles?: string[] | null;
|
|
73
|
+
roleCodes?: string[] | null;
|
|
74
|
+
permissions?: string[] | null;
|
|
75
|
+
};
|
|
76
|
+
export type Session = {
|
|
77
|
+
id?: string;
|
|
78
|
+
expiresAt: string;
|
|
79
|
+
createdAt?: string;
|
|
80
|
+
userAgent?: string | null;
|
|
81
|
+
ip?: string | null;
|
|
82
|
+
};
|
|
83
|
+
export type AuthResponse = {
|
|
84
|
+
user: User;
|
|
85
|
+
session: Session;
|
|
86
|
+
sessionToken?: string;
|
|
87
|
+
sessionExpiresAt?: string;
|
|
88
|
+
};
|
|
89
|
+
export type AuthErrorCode = 'USER_NOT_FOUND' | 'INVALID_PASSWORD' | 'USER_EXISTS' | 'VERIFICATION_EXPIRED' | 'VERIFICATION_MISMATCH' | 'VERIFICATION_NOT_FOUND' | 'TOO_MANY_ATTEMPTS' | 'REQUIRES_VERIFICATION' | 'UNAUTHORIZED' | 'ACCESS_DENIED' | 'HAS_NO_PASSWORD' | 'PASSWORD_ALREADY_SET';
|
|
90
|
+
export type AuthError = {
|
|
91
|
+
message: string;
|
|
92
|
+
code?: AuthErrorCode;
|
|
93
|
+
status?: number;
|
|
94
|
+
details?: Record<string, unknown>;
|
|
95
|
+
};
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AuthErrorContent = {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
};
|
|
5
|
+
type TranslatorFunction = (key: string, params?: Record<string, string | number>) => string;
|
|
6
|
+
export declare const handleError: (err: unknown, setError: (error: AuthErrorContent | null) => void, t: TranslatorFunction) => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizePhone(phone: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mesob/auth-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -13,6 +13,102 @@
|
|
|
13
13
|
"./components/*": {
|
|
14
14
|
"types": "./dist/components/*.d.ts",
|
|
15
15
|
"default": "./dist/components/*.js"
|
|
16
|
+
},
|
|
17
|
+
"./pages/auth/layout": {
|
|
18
|
+
"types": "./dist/pages/auth/layout.d.ts",
|
|
19
|
+
"default": "./dist/pages/auth/layout.js"
|
|
20
|
+
},
|
|
21
|
+
"./pages/auth/sign-in": {
|
|
22
|
+
"types": "./dist/pages/auth/sign-in.d.ts",
|
|
23
|
+
"default": "./dist/pages/auth/sign-in.js"
|
|
24
|
+
},
|
|
25
|
+
"./pages/auth/sign-up": {
|
|
26
|
+
"types": "./dist/pages/auth/sign-up.d.ts",
|
|
27
|
+
"default": "./dist/pages/auth/sign-up.js"
|
|
28
|
+
},
|
|
29
|
+
"./pages/auth/forgot-password": {
|
|
30
|
+
"types": "./dist/pages/auth/forgot-password.d.ts",
|
|
31
|
+
"default": "./dist/pages/auth/forgot-password.js"
|
|
32
|
+
},
|
|
33
|
+
"./pages/auth/reset-password": {
|
|
34
|
+
"types": "./dist/pages/auth/reset-password.d.ts",
|
|
35
|
+
"default": "./dist/pages/auth/reset-password.js"
|
|
36
|
+
},
|
|
37
|
+
"./pages/auth/verify-email": {
|
|
38
|
+
"types": "./dist/pages/auth/verify-email.d.ts",
|
|
39
|
+
"default": "./dist/pages/auth/verify-email.js"
|
|
40
|
+
},
|
|
41
|
+
"./pages/auth/set-password": {
|
|
42
|
+
"types": "./dist/pages/auth/set-password.d.ts",
|
|
43
|
+
"default": "./dist/pages/auth/set-password.js"
|
|
44
|
+
},
|
|
45
|
+
"./pages/auth/verify-phone": {
|
|
46
|
+
"types": "./dist/pages/auth/verify-phone.d.ts",
|
|
47
|
+
"default": "./dist/pages/auth/verify-phone.js"
|
|
48
|
+
},
|
|
49
|
+
"./pages/profile/layout": {
|
|
50
|
+
"types": "./dist/pages/profile/layout.d.ts",
|
|
51
|
+
"default": "./dist/pages/profile/layout.js"
|
|
52
|
+
},
|
|
53
|
+
"./pages/profile/account": {
|
|
54
|
+
"types": "./dist/pages/profile/account.d.ts",
|
|
55
|
+
"default": "./dist/pages/profile/account.js"
|
|
56
|
+
},
|
|
57
|
+
"./pages/profile/security": {
|
|
58
|
+
"types": "./dist/pages/profile/security.d.ts",
|
|
59
|
+
"default": "./dist/pages/profile/security.js"
|
|
60
|
+
},
|
|
61
|
+
"./pages/iam/users": {
|
|
62
|
+
"types": "./dist/pages/iam/users.d.ts",
|
|
63
|
+
"default": "./dist/pages/iam/users.js"
|
|
64
|
+
},
|
|
65
|
+
"./pages/iam/user-detail-layout": {
|
|
66
|
+
"types": "./dist/pages/iam/user-detail-layout.d.ts",
|
|
67
|
+
"default": "./dist/pages/iam/user-detail-layout.js"
|
|
68
|
+
},
|
|
69
|
+
"./pages/iam/user-detail": {
|
|
70
|
+
"types": "./dist/pages/iam/user-detail.d.ts",
|
|
71
|
+
"default": "./dist/pages/iam/user-detail.js"
|
|
72
|
+
},
|
|
73
|
+
"./pages/iam/user-activity": {
|
|
74
|
+
"types": "./dist/pages/iam/user-activity.d.ts",
|
|
75
|
+
"default": "./dist/pages/iam/user-activity.js"
|
|
76
|
+
},
|
|
77
|
+
"./pages/iam/roles": {
|
|
78
|
+
"types": "./dist/pages/iam/roles.d.ts",
|
|
79
|
+
"default": "./dist/pages/iam/roles.js"
|
|
80
|
+
},
|
|
81
|
+
"./pages/iam/role-detail-layout": {
|
|
82
|
+
"types": "./dist/pages/iam/role-detail-layout.d.ts",
|
|
83
|
+
"default": "./dist/pages/iam/role-detail-layout.js"
|
|
84
|
+
},
|
|
85
|
+
"./pages/iam/role-detail": {
|
|
86
|
+
"types": "./dist/pages/iam/role-detail.d.ts",
|
|
87
|
+
"default": "./dist/pages/iam/role-detail.js"
|
|
88
|
+
},
|
|
89
|
+
"./pages/iam/role-users": {
|
|
90
|
+
"types": "./dist/pages/iam/role-users.d.ts",
|
|
91
|
+
"default": "./dist/pages/iam/role-users.js"
|
|
92
|
+
},
|
|
93
|
+
"./pages/iam/role-permissions": {
|
|
94
|
+
"types": "./dist/pages/iam/role-permissions.d.ts",
|
|
95
|
+
"default": "./dist/pages/iam/role-permissions.js"
|
|
96
|
+
},
|
|
97
|
+
"./pages/iam/tenants": {
|
|
98
|
+
"types": "./dist/pages/iam/tenants.d.ts",
|
|
99
|
+
"default": "./dist/pages/iam/tenants.js"
|
|
100
|
+
},
|
|
101
|
+
"./pages/iam/tenant-detail": {
|
|
102
|
+
"types": "./dist/pages/iam/tenant-detail.d.ts",
|
|
103
|
+
"default": "./dist/pages/iam/tenant-detail.js"
|
|
104
|
+
},
|
|
105
|
+
"./pages/iam/sessions": {
|
|
106
|
+
"types": "./dist/pages/iam/sessions.d.ts",
|
|
107
|
+
"default": "./dist/pages/iam/sessions.js"
|
|
108
|
+
},
|
|
109
|
+
"./pages/iam/permissions": {
|
|
110
|
+
"types": "./dist/pages/iam/permissions.d.ts",
|
|
111
|
+
"default": "./dist/pages/iam/permissions.js"
|
|
16
112
|
}
|
|
17
113
|
},
|
|
18
114
|
"files": [
|
|
@@ -20,24 +116,27 @@
|
|
|
20
116
|
],
|
|
21
117
|
"dependencies": {
|
|
22
118
|
"@hookform/resolvers": "^5.2.2",
|
|
119
|
+
"@mesob/common": "^0.4.1",
|
|
120
|
+
"@mesob/ui": "^0.4.1",
|
|
23
121
|
"@tabler/icons-react": "^3.35.0",
|
|
24
122
|
"deepmerge-ts": "^7.1.5",
|
|
25
123
|
"openapi-fetch": "^0.15.0",
|
|
26
124
|
"openapi-react-query": "^0.5.1",
|
|
27
125
|
"react-hook-form": "^7.66.1",
|
|
28
126
|
"sonner": "^2.0.7",
|
|
29
|
-
"zod": "^4.1.12"
|
|
30
|
-
"@mesob/ui": "0.3.5"
|
|
127
|
+
"zod": "^4.1.12"
|
|
31
128
|
},
|
|
32
129
|
"devDependencies": {
|
|
33
130
|
"@types/react": "^19",
|
|
34
131
|
"@types/react-dom": "^19",
|
|
132
|
+
"next": "^16.1.1",
|
|
35
133
|
"openapi-typescript": "^7.0.0",
|
|
36
134
|
"tsup": "^8.5.0",
|
|
37
135
|
"typescript": "^5.7.2"
|
|
38
136
|
},
|
|
39
137
|
"peerDependencies": {
|
|
40
138
|
"@tanstack/react-query": "^5.0.0",
|
|
139
|
+
"next": "^16.0.0",
|
|
41
140
|
"next-intl": "^4.0.0",
|
|
42
141
|
"react": "^19.2.0",
|
|
43
142
|
"react-dom": "^19.2.0"
|
|
@@ -46,7 +145,7 @@
|
|
|
46
145
|
"access": "public"
|
|
47
146
|
},
|
|
48
147
|
"scripts": {
|
|
49
|
-
"build": "tsup",
|
|
148
|
+
"build": "tsup && pnpm exec tsc --noEmit false --emitDeclarationOnly --declaration --declarationMap false --outDir dist-types && cp -R dist-types/auth-react/src/. dist/ && rm -rf dist-types",
|
|
50
149
|
"dev": "tsup --watch",
|
|
51
150
|
"generate:client": "node scripts/generate-client.mjs",
|
|
52
151
|
"lint": "biome check --write .",
|
package/dist/types-vcfvnAzQ.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
type UIConfig = {
|
|
2
|
-
logo: React.ReactNode;
|
|
3
|
-
name: React.ReactNode;
|
|
4
|
-
logoImage?: string;
|
|
5
|
-
};
|
|
6
|
-
type FeaturesConfig = {
|
|
7
|
-
enableSignup?: boolean;
|
|
8
|
-
enablePasswordReset?: boolean;
|
|
9
|
-
enableEmailSignup?: boolean;
|
|
10
|
-
enablePhoneSignup?: boolean;
|
|
11
|
-
enableSocialSignup?: boolean;
|
|
12
|
-
socialProviders?: string[];
|
|
13
|
-
};
|
|
14
|
-
type TenantConfig = {
|
|
15
|
-
enabled: boolean;
|
|
16
|
-
tenantId: string;
|
|
17
|
-
};
|
|
18
|
-
type NavigationConfig = {
|
|
19
|
-
locale?: string;
|
|
20
|
-
defaultRedirectUrl?: string;
|
|
21
|
-
onNavigate?: (path: string) => void;
|
|
22
|
-
linkComponent?: React.ComponentType<React.ComponentProps<'a'> & {
|
|
23
|
-
href: string;
|
|
24
|
-
}>;
|
|
25
|
-
links?: {
|
|
26
|
-
signIn?: string;
|
|
27
|
-
signUp?: string;
|
|
28
|
-
forgotPassword?: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
type AuthClientConfig = {
|
|
32
|
-
baseURL: string;
|
|
33
|
-
ui: UIConfig;
|
|
34
|
-
features?: FeaturesConfig;
|
|
35
|
-
tenant?: TenantConfig;
|
|
36
|
-
navigation?: NavigationConfig;
|
|
37
|
-
messages?: Record<string, unknown>;
|
|
38
|
-
cookiePrefix?: string;
|
|
39
|
-
phoneRegex?: RegExp | string;
|
|
40
|
-
};
|
|
41
|
-
type User = {
|
|
42
|
-
id: string;
|
|
43
|
-
tenantId: string;
|
|
44
|
-
fullName: string;
|
|
45
|
-
email: string | null;
|
|
46
|
-
phone: string | null;
|
|
47
|
-
handle: string;
|
|
48
|
-
image: string | null;
|
|
49
|
-
emailVerified: boolean;
|
|
50
|
-
phoneVerified: boolean;
|
|
51
|
-
lastSignInAt: string | null;
|
|
52
|
-
/** Role IDs */
|
|
53
|
-
roles?: string[] | null;
|
|
54
|
-
};
|
|
55
|
-
type Session = {
|
|
56
|
-
id: string;
|
|
57
|
-
expiresAt: string;
|
|
58
|
-
createdAt?: string;
|
|
59
|
-
userAgent: string | null;
|
|
60
|
-
ip: string | null;
|
|
61
|
-
};
|
|
62
|
-
type AuthResponse = {
|
|
63
|
-
user: User;
|
|
64
|
-
session: Session;
|
|
65
|
-
sessionToken: string;
|
|
66
|
-
sessionExpiresAt: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type { AuthClientConfig as A, Session as S, User as U, AuthResponse as a };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type AuthErrorContent = {
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
type TranslatorFunction = (key: string, params?: Record<string, string | number>) => string;
|
|
8
|
-
declare const handleError: (err: unknown, setError: (error: AuthErrorContent | null) => void, t: TranslatorFunction) => void;
|
|
9
|
-
|
|
10
|
-
type VerificationFormValues = {
|
|
11
|
-
code: string;
|
|
12
|
-
};
|
|
13
|
-
type VerificationFormProps = {
|
|
14
|
-
verificationId: string;
|
|
15
|
-
onSubmit: (values: VerificationFormValues) => Promise<void> | void;
|
|
16
|
-
onResend: () => Promise<void> | void;
|
|
17
|
-
isLoading?: boolean;
|
|
18
|
-
error?: AuthErrorContent | string | null;
|
|
19
|
-
};
|
|
20
|
-
declare const VerificationForm: ({ onSubmit, onResend, isLoading, }: VerificationFormProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
-
|
|
22
|
-
export { type AuthErrorContent as A, VerificationForm as V, handleError as h };
|