@baseplate-dev/plugin-auth 0.1.3 → 0.6.2
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/CHANGELOG.md +702 -0
- package/README.md +3 -3
- package/dist/auth/core/common.d.ts +2 -5
- package/dist/auth/core/common.d.ts.map +1 -1
- package/dist/auth/core/common.js +15 -19
- package/dist/auth/core/common.js.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.d.ts.map +1 -1
- package/dist/auth/core/components/auth-definition-editor.js +46 -28
- package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
- package/dist/auth/core/components/role-editor-form/role-dialog.d.ts +14 -0
- package/dist/auth/core/components/role-editor-form/role-dialog.d.ts.map +1 -0
- package/dist/auth/core/components/role-editor-form/role-dialog.js +29 -0
- package/dist/auth/core/components/role-editor-form/role-dialog.js.map +1 -0
- package/dist/auth/core/components/role-editor-form/role-editor-form.d.ts +10 -0
- package/dist/auth/core/components/role-editor-form/role-editor-form.d.ts.map +1 -0
- package/dist/auth/core/components/role-editor-form/role-editor-form.js +52 -0
- package/dist/auth/core/components/role-editor-form/role-editor-form.js.map +1 -0
- package/dist/auth/core/node.d.ts +3 -3
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +14 -26
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/plugin-definition.d.ts +11 -69
- package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth/core/schema/plugin-definition.js +9 -24
- package/dist/auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth/core/schema/roles/constants.d.ts.map +1 -0
- package/dist/auth/core/schema/roles/constants.js.map +1 -0
- package/dist/auth/core/schema/roles/index.d.ts.map +1 -0
- package/dist/auth/core/schema/roles/index.js.map +1 -0
- package/dist/auth/core/schema/roles/schema.d.ts +54 -0
- package/dist/auth/core/schema/roles/schema.d.ts.map +1 -0
- package/dist/auth/core/schema/roles/schema.js +37 -0
- package/dist/auth/core/schema/roles/schema.js.map +1 -0
- package/dist/auth/core/web.d.ts +3 -3
- package/dist/auth/core/web.d.ts.map +1 -1
- package/dist/auth/core/web.js +5 -6
- package/dist/auth/core/web.js.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/plugin.json +8 -0
- package/dist/auth/utils/get-auth-plugin-definition.d.ts +9 -0
- package/dist/auth/utils/get-auth-plugin-definition.d.ts.map +1 -0
- package/dist/auth/utils/get-auth-plugin-definition.js +10 -0
- package/dist/auth/utils/get-auth-plugin-definition.js.map +1 -0
- package/dist/auth/utils/index.d.ts +2 -0
- package/dist/auth/utils/index.d.ts.map +1 -0
- package/dist/auth/utils/index.js +2 -0
- package/dist/auth/utils/index.js.map +1 -0
- package/dist/better-auth/constants/model-names.d.ts +8 -0
- package/dist/better-auth/constants/model-names.d.ts.map +1 -0
- package/dist/better-auth/constants/model-names.js +8 -0
- package/dist/better-auth/constants/model-names.js.map +1 -0
- package/dist/better-auth/constants/packages.d.ts +4 -0
- package/dist/better-auth/constants/packages.d.ts.map +1 -0
- package/dist/better-auth/constants/packages.js +4 -0
- package/dist/better-auth/constants/packages.js.map +1 -0
- package/dist/better-auth/core/common.d.ts +6 -0
- package/dist/better-auth/core/common.d.ts.map +1 -0
- package/dist/better-auth/core/common.js +17 -0
- package/dist/better-auth/core/common.js.map +1 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.d.ts +5 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +1 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.js +50 -0
- package/dist/better-auth/core/components/better-auth-definition-editor.js.map +1 -0
- package/dist/better-auth/core/index.d.ts +2 -0
- package/dist/better-auth/core/index.d.ts.map +1 -0
- package/dist/better-auth/core/index.js +2 -0
- package/dist/better-auth/core/index.js.map +1 -0
- package/dist/better-auth/core/node.d.ts +5 -0
- package/dist/better-auth/core/node.d.ts.map +1 -0
- package/dist/better-auth/core/node.js +47 -0
- package/dist/better-auth/core/node.js.map +1 -0
- package/dist/better-auth/core/schema/models.d.ts +3 -0
- package/dist/better-auth/core/schema/models.d.ts.map +1 -0
- package/dist/better-auth/core/schema/models.js +278 -0
- package/dist/better-auth/core/schema/models.js.map +1 -0
- package/dist/better-auth/core/schema/plugin-definition.d.ts +5 -0
- package/dist/better-auth/core/schema/plugin-definition.d.ts.map +1 -0
- package/dist/better-auth/core/schema/plugin-definition.js +4 -0
- package/dist/better-auth/core/schema/plugin-definition.js.map +1 -0
- package/dist/better-auth/core/web.d.ts +6 -0
- package/dist/better-auth/core/web.d.ts.map +1 -0
- package/dist/better-auth/core/web.js +13 -0
- package/dist/better-auth/core/web.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +85 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +75 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +142 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js +11 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts +16 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js +28 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +73 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +84 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +30 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +37 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +65 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +72 -0
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts +4 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.js +3 -0
- package/dist/better-auth/generators/fastify/better-auth-module/index.js.map +1 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/plugins/better-auth.plugin.ts +31 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/schema/user-session.queries.ts +22 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +62 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/user-session.service.ts +72 -0
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/utils/headers.utils.ts +21 -0
- package/dist/better-auth/generators/fastify/index.d.ts +2 -0
- package/dist/better-auth/generators/fastify/index.d.ts.map +1 -0
- package/dist/better-auth/generators/fastify/index.js +2 -0
- package/dist/better-auth/generators/fastify/index.js.map +1 -0
- package/dist/better-auth/generators/index.d.ts.map +1 -0
- package/dist/better-auth/generators/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts +43 -0
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js +37 -0
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts +72 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js +11 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +14 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js +26 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts +27 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js +43 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts +18 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js +27 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts +51 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js +48 -0
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts +2 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.js +2 -0
- package/dist/better-auth/generators/react/better-auth-hooks/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-log-out.ts +18 -0
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-required-user-id.ts +11 -0
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-session.ts +30 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +237 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js +26 -0
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +688 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.js +9 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts +13 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js +25 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +238 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js +44 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +895 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +35 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.d.ts +2 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.js +2 -0
- package/dist/better-auth/generators/react/better-auth-pages/index.js.map +1 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/login.tsx +146 -0
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/auth/register.tsx +162 -0
- package/dist/better-auth/generators/react/index.d.ts +4 -0
- package/dist/better-auth/generators/react/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/index.js +4 -0
- package/dist/better-auth/generators/react/index.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +491 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.js +11 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts +13 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js +25 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +248 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js +51 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +21 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +30 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +235 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js +33 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/index.d.ts +4 -0
- package/dist/better-auth/generators/react/react-better-auth/index.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/index.js +3 -0
- package/dist/better-auth/generators/react/react-better-auth/index.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +268 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js +74 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js.map +1 -0
- package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +58 -0
- package/dist/better-auth/generators/react/react-better-auth/templates/src/services/auth-client.ts +15 -0
- package/dist/better-auth/index.d.ts +3 -0
- package/dist/better-auth/index.d.ts.map +1 -0
- package/dist/better-auth/index.js +2 -0
- package/dist/better-auth/index.js.map +1 -0
- package/dist/better-auth/plugin.json +9 -0
- package/dist/better-auth/static/icon.svg +10 -0
- package/dist/common/components/auth-config-tabs.d.ts +2 -0
- package/dist/common/components/auth-config-tabs.d.ts.map +1 -0
- package/dist/common/components/auth-config-tabs.js +21 -0
- package/dist/common/components/auth-config-tabs.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/local-auth/admin/common.d.ts +5 -0
- package/dist/local-auth/admin/common.d.ts.map +1 -0
- package/dist/local-auth/admin/common.js +29 -0
- package/dist/local-auth/admin/common.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +474 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +125 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +474 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js +9 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +24 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +242 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +41 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +231 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +20 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +22 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +78 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +167 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +473 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +117 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +474 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js +9 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +12 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +24 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +242 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +41 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +459 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +22 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +22 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +89 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +174 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +221 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +54 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts +2 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +1 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js +2 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js.map +1 -0
- package/dist/local-auth/admin/node.d.ts +5 -0
- package/dist/local-auth/admin/node.d.ts.map +1 -0
- package/dist/local-auth/admin/node.js +57 -0
- package/dist/local-auth/admin/node.js.map +1 -0
- package/dist/local-auth/admin/schema/manage-role-action.d.ts +12 -0
- package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/manage-role-action.js +6 -0
- package/dist/local-auth/admin/schema/manage-role-action.js.map +1 -0
- package/dist/local-auth/admin/schema/reset-password-action.d.ts +12 -0
- package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/reset-password-action.js +6 -0
- package/dist/local-auth/admin/schema/reset-password-action.js.map +1 -0
- package/dist/local-auth/admin/schema/roles-column.d.ts +9 -0
- package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -0
- package/dist/local-auth/admin/schema/roles-column.js +6 -0
- package/dist/local-auth/admin/schema/roles-column.js.map +1 -0
- package/dist/local-auth/admin/web.d.ts +5 -0
- package/dist/local-auth/admin/web.d.ts.map +1 -0
- package/dist/local-auth/admin/web.js +39 -0
- package/dist/local-auth/admin/web.js.map +1 -0
- package/dist/local-auth/constants/model-names.d.ts +23 -0
- package/dist/local-auth/constants/model-names.d.ts.map +1 -0
- package/dist/local-auth/constants/model-names.js +23 -0
- package/dist/local-auth/constants/model-names.js.map +1 -0
- package/dist/local-auth/core/common.d.ts +6 -0
- package/dist/local-auth/core/common.d.ts.map +1 -0
- package/dist/local-auth/core/common.js +17 -0
- package/dist/local-auth/core/common.js.map +1 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts +5 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.js +59 -0
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +14 -0
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js +40 -0
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/index.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-apollo/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/index.js +2 -0
- package/dist/local-auth/core/generators/auth-apollo/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js +20 -0
- package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js.map +1 -0
- package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.ts +18 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +136 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +76 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +359 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +30 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +110 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +93 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +45 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +46 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +394 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +141 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/index.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-email-password/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/index.js +3 -0
- package/dist/local-auth/core/generators/auth-email-password/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +17 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +18 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +21 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js +24 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.ts +35 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +38 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +54 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +72 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +91 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts +24 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +87 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +140 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +37 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +161 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +235 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +60 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +207 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +330 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +43 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +48 -0
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +96 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +26 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +41 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +59 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +60 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +42 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.js +2 -0
- package/dist/local-auth/core/generators/auth-email-templates/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.tsx +55 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js +12 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.tsx +44 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js +14 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.tsx +55 -0
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +62 -0
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js +32 -0
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +108 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts +14 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js +26 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js +45 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +29 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +37 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +91 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js +50 -0
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/index.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-hooks/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/index.js +3 -0
- package/dist/local-auth/core/generators/auth-hooks/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +30 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +33 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +15 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +16 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +32 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +15 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +16 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +117 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +103 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +281 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +24 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +36 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +102 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +109 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +30 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +37 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +269 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +192 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/index.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-module/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/index.js +3 -0
- package/dist/local-auth/core/generators/auth-module/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts +16 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.js +17 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.d.ts +8 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.js +16 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.ts +21 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js +23 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.ts +26 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js +19 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.ts +25 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +18 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +22 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +36 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +43 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +40 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +106 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +146 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts +15 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js +35 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +47 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts +43 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +190 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +262 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts +38 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js +71 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.ts +77 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts +11 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +38 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.ts +42 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js +35 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +256 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +32 -0
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +1455 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.js +11 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +28 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +257 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +62 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +21 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +30 -0
- package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +2143 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +117 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/index.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-routes/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/index.js +3 -0
- package/dist/local-auth/core/generators/auth-routes/index.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js +11 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.ts +12 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +60 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +127 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +85 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +168 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +82 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +153 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +150 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +283 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.js +10 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.tsx +17 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +106 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js.map +1 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +206 -0
- package/dist/local-auth/core/generators/index.d.ts +10 -0
- package/dist/local-auth/core/generators/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/index.js +10 -0
- package/dist/local-auth/core/generators/index.js.map +1 -0
- package/dist/local-auth/core/generators/react-auth/index.d.ts +2 -0
- package/dist/local-auth/core/generators/react-auth/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-auth/index.js +2 -0
- package/dist/local-auth/core/generators/react-auth/index.js.map +1 -0
- package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts +9 -0
- package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-auth/react-auth.generator.js +31 -0
- package/dist/local-auth/core/generators/react-auth/react-auth.generator.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +532 -0
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/index.js +11 -0
- package/dist/local-auth/core/generators/react-session/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts +13 -0
- package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/template-paths.js +25 -0
- package/dist/local-auth/core/generators/react-session/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +264 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.js +51 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +21 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +30 -0
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +511 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +35 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/index.d.ts +4 -0
- package/dist/local-auth/core/generators/react-session/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/index.js +3 -0
- package/dist/local-auth/core/generators/react-session/index.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +283 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.js +48 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts +7 -0
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +72 -0
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +99 -0
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +58 -0
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +1 -0
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +103 -0
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -0
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts +122 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +99 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.js +11 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.d.ts +12 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.js +24 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +50 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js +46 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts +18 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js +26 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +39 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js +21 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/index.d.ts +4 -0
- package/dist/local-auth/core/generators/seed-initial-user/index.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/index.js +3 -0
- package/dist/local-auth/core/generators/seed-initial-user/index.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +58 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +57 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts +3 -0
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js +32 -0
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js.map +1 -0
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.ts +43 -0
- package/dist/local-auth/core/index.d.ts +2 -0
- package/dist/local-auth/core/index.d.ts.map +1 -0
- package/dist/local-auth/core/index.js +2 -0
- package/dist/local-auth/core/index.js.map +1 -0
- package/dist/local-auth/core/node.d.ts +5 -0
- package/dist/local-auth/core/node.d.ts.map +1 -0
- package/dist/local-auth/core/node.js +69 -0
- package/dist/local-auth/core/node.js.map +1 -0
- package/dist/local-auth/core/schema/models.d.ts +3 -0
- package/dist/local-auth/core/schema/models.d.ts.map +1 -0
- package/dist/local-auth/core/schema/models.js +266 -0
- package/dist/local-auth/core/schema/models.js.map +1 -0
- package/dist/local-auth/core/schema/plugin-definition.d.ts +9 -0
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -0
- package/dist/local-auth/core/schema/plugin-definition.js +13 -0
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -0
- package/dist/local-auth/core/web.d.ts +6 -0
- package/dist/local-auth/core/web.d.ts.map +1 -0
- package/dist/local-auth/core/web.js +13 -0
- package/dist/local-auth/core/web.js.map +1 -0
- package/dist/local-auth/index.d.ts +2 -0
- package/dist/local-auth/index.d.ts.map +1 -0
- package/dist/local-auth/index.js +2 -0
- package/dist/local-auth/index.js.map +1 -0
- package/dist/local-auth/plugin.json +9 -0
- package/dist/local-auth/static/icon.svg +1 -0
- package/dist/placeholder-auth/constants/model-names.d.ts +4 -0
- package/dist/placeholder-auth/constants/model-names.d.ts.map +1 -0
- package/dist/placeholder-auth/constants/model-names.js +4 -0
- package/dist/placeholder-auth/constants/model-names.js.map +1 -0
- package/dist/placeholder-auth/core/common.d.ts +5 -0
- package/dist/placeholder-auth/core/common.d.ts.map +1 -0
- package/dist/placeholder-auth/core/common.js +17 -0
- package/dist/placeholder-auth/core/common.js.map +1 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts +5 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +50 -0
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -0
- package/dist/placeholder-auth/core/generators/index.d.ts +4 -0
- package/dist/placeholder-auth/core/generators/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/index.js +4 -0
- package/dist/placeholder-auth/core/generators/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +46 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.js +11 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +14 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +26 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +18 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +35 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +18 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +27 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +17 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +45 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.d.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +37 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js +32 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.d.ts +5 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.js +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.ts +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts +9 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.js +8 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.ts +13 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts +5 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js +13 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +14 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts +47 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.js +27 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +79 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.js +11 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.d.ts +12 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.js +24 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +41 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.js +41 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js +23 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +28 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js +20 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.d.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts +23 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js +29 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.ts +41 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.d.ts +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.js +2 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.js.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts +9 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts.map +1 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.js +31 -0
- package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.js.map +1 -0
- package/dist/placeholder-auth/core/index.d.ts +2 -0
- package/dist/placeholder-auth/core/index.d.ts.map +1 -0
- package/dist/placeholder-auth/core/index.js +2 -0
- package/dist/placeholder-auth/core/index.js.map +1 -0
- package/dist/placeholder-auth/core/node.d.ts +5 -0
- package/dist/placeholder-auth/core/node.d.ts.map +1 -0
- package/dist/placeholder-auth/core/node.js +32 -0
- package/dist/placeholder-auth/core/node.js.map +1 -0
- package/dist/placeholder-auth/core/schema/models.d.ts +3 -0
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -0
- package/dist/placeholder-auth/core/schema/models.js +38 -0
- package/dist/placeholder-auth/core/schema/models.js.map +1 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +5 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.js +4 -0
- package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -0
- package/dist/placeholder-auth/core/web.d.ts +6 -0
- package/dist/placeholder-auth/core/web.d.ts.map +1 -0
- package/dist/placeholder-auth/core/web.js +13 -0
- package/dist/placeholder-auth/core/web.js.map +1 -0
- package/dist/placeholder-auth/index.d.ts +2 -0
- package/dist/placeholder-auth/index.d.ts.map +1 -0
- package/dist/placeholder-auth/index.js +2 -0
- package/dist/placeholder-auth/index.js.map +1 -0
- package/dist/placeholder-auth/plugin.json +10 -0
- package/dist/placeholder-auth/static/icon.svg +1 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-CIVhaGqo.js +29 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-CIVhaGqo.js.map +1 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-N-mh42Bs.js +438 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-N-mh42Bs.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js +20 -0
- package/dist/web/assets/__federation_expose_better-authCoreCommon-BIU3Fg7K.js.map +1 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js +402 -0
- package/dist/web/assets/__federation_expose_better-authCoreWeb-CMhPrXPA.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authAdminCommon-DvHe9w29.js +63 -0
- package/dist/web/assets/__federation_expose_local-authAdminCommon-DvHe9w29.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authAdminWeb-CLU9aEy9.js +41 -0
- package/dist/web/assets/__federation_expose_local-authAdminWeb-CLU9aEy9.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-DbuvGG7o.js +21 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-DbuvGG7o.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js +432 -0
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js +23 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js +162 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map +1 -0
- package/dist/web/assets/__federation_fn_import-BLFDCY-V.js +421 -0
- package/dist/web/assets/__federation_fn_import-BLFDCY-V.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-bRU6KpPk.js +357 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-bRU6KpPk.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CQKLkNsU.js +21193 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CQKLkNsU.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js +57231 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js +1821 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/react-router-CbExBaoL.js +6762 -0
- package/dist/web/assets/__federation_shared_@tanstack/react-router-CbExBaoL.js.map +1 -0
- package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js +8 -0
- package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js.map +1 -0
- package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js +251 -0
- package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js.map +1 -0
- package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js +13250 -0
- package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +1 -0
- package/dist/web/assets/_commonjsHelpers-B85MJLTf.js +6 -0
- package/dist/web/assets/_commonjsHelpers-B85MJLTf.js.map +1 -0
- package/dist/web/assets/get-auth-plugin-definition-BL50g0cJ.js +13 -0
- package/dist/web/assets/get-auth-plugin-definition-BL50g0cJ.js.map +1 -0
- package/dist/web/assets/index-B_A3cgiy.js +103 -0
- package/dist/web/assets/index-B_A3cgiy.js.map +1 -0
- package/dist/web/assets/index-DUwCgkeV.js +570 -0
- package/dist/web/assets/index-DUwCgkeV.js.map +1 -0
- package/dist/web/assets/index.esm-BraHxHLB.js +2676 -0
- package/dist/web/assets/index.esm-BraHxHLB.js.map +1 -0
- package/dist/web/assets/isEqual-tnzoadW8.js +242 -0
- package/dist/web/assets/isEqual-tnzoadW8.js.map +1 -0
- package/dist/web/assets/jsx-runtime-XI9uIe3W.js +60 -0
- package/dist/web/assets/jsx-runtime-XI9uIe3W.js.map +1 -0
- package/dist/web/assets/mergeWith-VagwCqUi.js +76 -0
- package/dist/web/assets/mergeWith-VagwCqUi.js.map +1 -0
- package/dist/web/assets/model-names-DrcaRxt1.js +25 -0
- package/dist/web/assets/model-names-DrcaRxt1.js.map +1 -0
- package/dist/web/assets/model-utils-BfcjfzCn.js +694 -0
- package/dist/web/assets/model-utils-BfcjfzCn.js.map +1 -0
- package/dist/web/assets/plugin-definition-CXnKUJ1l.js +20 -0
- package/dist/web/assets/plugin-definition-CXnKUJ1l.js.map +1 -0
- package/dist/web/assets/plugin-definition-Ckl5hjD1.js +31 -0
- package/dist/web/assets/plugin-definition-Ckl5hjD1.js.map +1 -0
- package/dist/web/assets/plugin-definition-D26rR8AB.js +16 -0
- package/dist/web/assets/plugin-definition-D26rR8AB.js.map +1 -0
- package/dist/web/assets/plugin-definition-DJzXScRp.js +79 -0
- package/dist/web/assets/plugin-definition-DJzXScRp.js.map +1 -0
- package/dist/web/assets/react-CL9M_wyN.js +47 -0
- package/dist/web/assets/react-CL9M_wyN.js.map +1 -0
- package/dist/web/assets/registries-Tz_dluz3.js +1119 -0
- package/dist/web/assets/registries-Tz_dluz3.js.map +1 -0
- package/dist/web/assets/remoteEntry.js +30 -6
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/style-DiK_rD1L.css +120 -0
- package/dist/web/assets/styles-tkrWV-ZE.js +59 -0
- package/dist/web/assets/styles-tkrWV-ZE.js.map +1 -0
- package/dist/web/index.html +1 -1
- package/package.json +44 -30
- package/dist/auth/core/components/role-editor-form.d.ts +0 -10
- package/dist/auth/core/components/role-editor-form.d.ts.map +0 -1
- package/dist/auth/core/components/role-editor-form.js +0 -27
- package/dist/auth/core/components/role-editor-form.js.map +0 -1
- package/dist/auth/core/schema/models.d.ts +0 -9
- package/dist/auth/core/schema/models.d.ts.map +0 -1
- package/dist/auth/core/schema/models.js +0 -198
- package/dist/auth/core/schema/models.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts +0 -65
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js +0 -62
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.d.ts +0 -96
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js +0 -94
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/templates/management.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session-payload.object-type.ts +0 -23
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.mutations.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.queries.ts +0 -20
- package/dist/auth/generators/fastify/auth-module/templates/services/user-session.service.ts +0 -251
- package/dist/auth/generators/fastify/auth-module/templates/user-session.service.ts +0 -101
- package/dist/auth/generators/fastify/auth-module/templates/utils/cookie-signer.ts +0 -71
- package/dist/auth/generators/fastify/auth-module/templates/utils/session-cookie.ts +0 -42
- package/dist/auth/generators/fastify/index.d.ts +0 -2
- package/dist/auth/generators/fastify/index.d.ts.map +0 -1
- package/dist/auth/generators/fastify/index.js +0 -2
- package/dist/auth/generators/fastify/index.js.map +0 -1
- package/dist/auth/generators/index.d.ts +0 -2
- package/dist/auth/generators/index.d.ts.map +0 -1
- package/dist/auth/generators/index.js +0 -2
- package/dist/auth/generators/index.js.map +0 -1
- package/dist/auth/metadata.json +0 -8
- package/dist/auth0/constants/packages.d.ts +0 -6
- package/dist/auth0/constants/packages.d.ts.map +0 -1
- package/dist/auth0/constants/packages.js +0 -6
- package/dist/auth0/constants/packages.js.map +0 -1
- package/dist/auth0/core/common.d.ts +0 -7
- package/dist/auth0/core/common.d.ts.map +0 -1
- package/dist/auth0/core/common.js +0 -28
- package/dist/auth0/core/common.js.map +0 -1
- package/dist/auth0/core/components/auth-definition-editor.d.ts +0 -5
- package/dist/auth0/core/components/auth-definition-editor.d.ts.map +0 -1
- package/dist/auth0/core/components/auth-definition-editor.js +0 -57
- package/dist/auth0/core/components/auth-definition-editor.js.map +0 -1
- package/dist/auth0/core/components/role-dialog.d.ts +0 -14
- package/dist/auth0/core/components/role-dialog.d.ts.map +0 -1
- package/dist/auth0/core/components/role-dialog.js +0 -27
- package/dist/auth0/core/components/role-dialog.js.map +0 -1
- package/dist/auth0/core/components/role-editor-form.d.ts +0 -10
- package/dist/auth0/core/components/role-editor-form.d.ts.map +0 -1
- package/dist/auth0/core/components/role-editor-form.js +0 -52
- package/dist/auth0/core/components/role-editor-form.js.map +0 -1
- package/dist/auth0/core/node.d.ts +0 -5
- package/dist/auth0/core/node.d.ts.map +0 -1
- package/dist/auth0/core/node.js +0 -86
- package/dist/auth0/core/node.js.map +0 -1
- package/dist/auth0/core/schema/migrations.d.ts +0 -3
- package/dist/auth0/core/schema/migrations.d.ts.map +0 -1
- package/dist/auth0/core/schema/migrations.js +0 -17
- package/dist/auth0/core/schema/migrations.js.map +0 -1
- package/dist/auth0/core/schema/models.d.ts +0 -6
- package/dist/auth0/core/schema/models.d.ts.map +0 -1
- package/dist/auth0/core/schema/models.js +0 -39
- package/dist/auth0/core/schema/models.js.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +0 -73
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.js +0 -17
- package/dist/auth0/core/schema/plugin-definition.js.map +0 -1
- package/dist/auth0/core/web.d.ts +0 -6
- package/dist/auth0/core/web.d.ts.map +0 -1
- package/dist/auth0/core/web.js +0 -14
- package/dist/auth0/core/web.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +0 -67
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +0 -125
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.d.ts +0 -43
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.js +0 -25
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/templates/management.ts +0 -22
- package/dist/auth0/generators/fastify/auth0-module/templates/user-session.service.ts +0 -101
- package/dist/auth0/generators/fastify/index.d.ts +0 -2
- package/dist/auth0/generators/fastify/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/index.js +0 -2
- package/dist/auth0/generators/fastify/index.js.map +0 -1
- package/dist/auth0/generators/index.d.ts.map +0 -1
- package/dist/auth0/generators/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts +0 -10
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js +0 -41
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +0 -11
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts +0 -61
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js +0 -59
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts +0 -106
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.js +0 -28
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/templates/auth0-callback.page.tsx +0 -61
- package/dist/auth0/generators/react/auth0-callback/templates/signup.page.tsx +0 -48
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts +0 -53
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js +0 -44
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts +0 -45
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js +0 -13
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/templates/RequireAuth.tsx +0 -22
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +0 -28
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +0 -65
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts +0 -8
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js +0 -12
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js +0 -16
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts +0 -33
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js +0 -50
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/useCurrentUser.gql +0 -10
- package/dist/auth0/generators/react/auth0-hooks/templates/useCurrentUser.ts +0 -29
- package/dist/auth0/generators/react/auth0-hooks/templates/useLogOut.ts +0 -14
- package/dist/auth0/generators/react/auth0-hooks/templates/useRequiredUserId.ts +0 -11
- package/dist/auth0/generators/react/auth0-hooks/templates/useSession.ts +0 -23
- package/dist/auth0/generators/react/index.d.ts +0 -6
- package/dist/auth0/generators/react/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/index.js +0 -6
- package/dist/auth0/generators/react/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +0 -23
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js +0 -64
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +0 -1
- package/dist/auth0/metadata.json +0 -8
- package/dist/auth0/static/icon.svg +0 -7
- package/dist/index.js.map +0 -1
- package/dist/roles/constants.d.ts.map +0 -1
- package/dist/roles/constants.js.map +0 -1
- package/dist/roles/index.d.ts.map +0 -1
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/schema.d.ts +0 -65
- package/dist/roles/schema.d.ts.map +0 -1
- package/dist/roles/schema.js +0 -43
- package/dist/roles/schema.js.map +0 -1
- package/dist/utils/cn.d.ts +0 -2
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -2
- package/dist/utils/cn.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DCwCR5dZ.js +0 -54
- package/dist/web/assets/__federation_expose_auth0CoreCommon-DCwCR5dZ.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BlCwYpTq.js +0 -383
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BlCwYpTq.js.map +0 -1
- package/dist/web/assets/__federation_fn_import-dzKjrTzS.js +0 -421
- package/dist/web/assets/__federation_fn_import-dzKjrTzS.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXHJHUXP.js +0 -341
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXHJHUXP.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-GtzVuDsM.js +0 -9901
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-GtzVuDsM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ChoqtPkg.js +0 -12723
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ChoqtPkg.js.map +0 -1
- package/dist/web/assets/__federation_shared_react-dom-Bwq4pLax.js +0 -250
- package/dist/web/assets/__federation_shared_react-dom-Bwq4pLax.js.map +0 -1
- package/dist/web/assets/__federation_shared_react-uocnGSER.js +0 -7
- package/dist/web/assets/__federation_shared_react-uocnGSER.js.map +0 -1
- package/dist/web/assets/__federation_shared_zod-BK7IELHt.js +0 -4380
- package/dist/web/assets/__federation_shared_zod-BK7IELHt.js.map +0 -1
- package/dist/web/assets/index-B1hOKVPw.js +0 -574
- package/dist/web/assets/index-B1hOKVPw.js.map +0 -1
- package/dist/web/assets/index-BxDOOHD-.js +0 -95
- package/dist/web/assets/index-BxDOOHD-.js.map +0 -1
- package/dist/web/assets/index.esm-BZEyAv4m.js +0 -2584
- package/dist/web/assets/index.esm-BZEyAv4m.js.map +0 -1
- package/dist/web/assets/model-merger-CdV-7CWE.js +0 -2039
- package/dist/web/assets/model-merger-CdV-7CWE.js.map +0 -1
- package/dist/web/assets/plugin-definition-C9Q-BrBQ.js +0 -78
- package/dist/web/assets/plugin-definition-C9Q-BrBQ.js.map +0 -1
- package/dist/web/assets/react-BfiX28GO.js +0 -47
- package/dist/web/assets/react-BfiX28GO.js.map +0 -1
- package/dist/web/assets/style-BdgwWjAf.css +0 -95
- package/dist/web-export.js.map +0 -1
- package/manifest.json +0 -4
- /package/dist/{roles → auth/core/schema/roles}/constants.d.ts +0 -0
- /package/dist/{roles → auth/core/schema/roles}/constants.js +0 -0
- /package/dist/{roles → auth/core/schema/roles}/index.d.ts +0 -0
- /package/dist/{roles → auth/core/schema/roles}/index.js +0 -0
- /package/dist/{auth0 → better-auth}/generators/index.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/generators/index.js +0 -0
- /package/dist/{auth/generators/fastify/auth-module/templates → local-auth/core/generators/auth-module/templates/module/constants}/user-session.constants.ts +0 -0
- /package/dist/{auth/generators/fastify/auth-module/templates → local-auth/core/generators/auth-module/templates/module}/utils/verify-request-origin.ts +0 -0
package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { AUTH_ROLE_CONFIG } from '%authRolesImports';
|
|
3
|
+
import { prisma } from '%prismaImports';
|
|
4
|
+
/**
|
|
5
|
+
* Updates the roles assigned to a user.
|
|
6
|
+
* Filters out built-in roles (public, user, system) as these are automatically assigned.
|
|
7
|
+
*
|
|
8
|
+
* @param params - The parameters for updating user roles
|
|
9
|
+
* @param params.userId - The ID of the user to update
|
|
10
|
+
* @param params.roles - Array of role names to assign to the user
|
|
11
|
+
* @returns The updated user with their roles
|
|
12
|
+
*/
|
|
13
|
+
export async function updateUserRoles({ userId, roles, }) {
|
|
14
|
+
// Filter out built-in roles (public, user, system)
|
|
15
|
+
const validRoles = roles.filter((role) => {
|
|
16
|
+
if (!(role in AUTH_ROLE_CONFIG)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const roleConfig = AUTH_ROLE_CONFIG[role];
|
|
20
|
+
return !roleConfig.builtIn;
|
|
21
|
+
});
|
|
22
|
+
await prisma.$transaction([
|
|
23
|
+
prisma.userRole.deleteMany({
|
|
24
|
+
where: { userId, role: { notIn: validRoles } },
|
|
25
|
+
}),
|
|
26
|
+
prisma.userRole.createMany({
|
|
27
|
+
data: validRoles.map((role) => ({ userId, role })),
|
|
28
|
+
skipDuplicates: true,
|
|
29
|
+
}),
|
|
30
|
+
]);
|
|
31
|
+
return prisma.user.findUnique({
|
|
32
|
+
where: { id: userId },
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=user-roles.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-roles.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAKd,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EACpC,MAAM,EACN,KAAK,GAIN;IACC,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACvC,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAgB,CAAC,CAAC;QACtD,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,YAAY,CAAC;QACxB,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;YACzB,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;SAC/C,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;YACzB,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YAClD,cAAc,EAAE,IAAI;SACrB,CAAC;KACH,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QAC5B,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;KACtB,CAAkB,CAAC;AACtB,CAAC"}
|
package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import type { AuthRole } from '%authRolesImports';
|
|
4
|
+
import type { User } from '%prismaGeneratedImports';
|
|
5
|
+
|
|
6
|
+
import { AUTH_ROLE_CONFIG } from '%authRolesImports';
|
|
7
|
+
import { prisma } from '%prismaImports';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Updates the roles assigned to a user.
|
|
11
|
+
* Filters out built-in roles (public, user, system) as these are automatically assigned.
|
|
12
|
+
*
|
|
13
|
+
* @param params - The parameters for updating user roles
|
|
14
|
+
* @param params.userId - The ID of the user to update
|
|
15
|
+
* @param params.roles - Array of role names to assign to the user
|
|
16
|
+
* @returns The updated user with their roles
|
|
17
|
+
*/
|
|
18
|
+
export async function updateUserRoles({
|
|
19
|
+
userId,
|
|
20
|
+
roles,
|
|
21
|
+
}: {
|
|
22
|
+
userId: string;
|
|
23
|
+
roles: string[];
|
|
24
|
+
}): Promise<User> {
|
|
25
|
+
// Filter out built-in roles (public, user, system)
|
|
26
|
+
const validRoles = roles.filter((role) => {
|
|
27
|
+
if (!(role in AUTH_ROLE_CONFIG)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
const roleConfig = AUTH_ROLE_CONFIG[role as AuthRole];
|
|
31
|
+
return !roleConfig.builtIn;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
await prisma.$transaction([
|
|
35
|
+
prisma.userRole.deleteMany({
|
|
36
|
+
where: { userId, role: { notIn: validRoles } },
|
|
37
|
+
}),
|
|
38
|
+
prisma.userRole.createMany({
|
|
39
|
+
data: validRoles.map((role) => ({ userId, role })),
|
|
40
|
+
skipDuplicates: true,
|
|
41
|
+
}),
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
return prisma.user.findUnique({
|
|
45
|
+
where: { id: userId },
|
|
46
|
+
}) as Promise<User>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AuthUserSessionInfo } from '%authContextImports';
|
|
2
|
+
import type { RequestServiceContext } from '%requestServiceContextImports';
|
|
3
|
+
import type { UserSessionPayload, UserSessionService } from '%userSessionTypesImports';
|
|
4
|
+
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
5
|
+
export declare class CookieUserSessionService implements UserSessionService {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a user session cookie and sets it in the response.
|
|
8
|
+
*
|
|
9
|
+
* @param userId The ID of the user for whom the session is being created.
|
|
10
|
+
* @param context The request service context
|
|
11
|
+
* @param currentDate The current date and time. Defaults to the current date and time.
|
|
12
|
+
* @returns The session payload
|
|
13
|
+
*/
|
|
14
|
+
createSession(userId: string, context: RequestServiceContext, currentDate?: Date): Promise<UserSessionPayload>;
|
|
15
|
+
/**
|
|
16
|
+
* Ends the user session by clearing the session cookie and deleting the session from the database.
|
|
17
|
+
*
|
|
18
|
+
* @param sessionInfo The session info
|
|
19
|
+
* @param context The request service context
|
|
20
|
+
*/
|
|
21
|
+
clearSession(sessionInfo: AuthUserSessionInfo, context: RequestServiceContext): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the user session information from the request.
|
|
24
|
+
*
|
|
25
|
+
* @param req - The Fastify request object containing the cookies.
|
|
26
|
+
* @param reply - The Fastify reply object used to set or clear cookies.
|
|
27
|
+
* @param currentDate - The current date used for session validation. Defaults to the current date and time.
|
|
28
|
+
* @returns A promise that resolves to the authenticated user session information or null if the session is invalid.
|
|
29
|
+
* @throws {InvalidSessionError} If the session is invalid or expired.
|
|
30
|
+
*/
|
|
31
|
+
getSessionInfoFromRequest(req: FastifyRequest, reply?: FastifyReply): Promise<AuthUserSessionInfo | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the user session information from the authentication token
|
|
34
|
+
*
|
|
35
|
+
* Note: Since we use cookies, we ignore the authToken parameter
|
|
36
|
+
*
|
|
37
|
+
* @param req The request object
|
|
38
|
+
* @returns The session info or undefined if no session is found
|
|
39
|
+
*/
|
|
40
|
+
getSessionInfoFromToken(req: FastifyRequest): Promise<AuthUserSessionInfo | undefined>;
|
|
41
|
+
}
|
|
42
|
+
export declare const userSessionService: CookieUserSessionService;
|
|
43
|
+
//# sourceMappingURL=user-session.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-session.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkF5D,qBAAa,wBAAyB,YAAW,kBAAkB;IACjE;;;;;;;OAOG;IACG,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,qBAAqB,EAC9B,WAAW,GAAE,IAAiB,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAiC9B;;;;;OAKG;IACG,YAAY,CAChB,WAAW,EAAE,mBAAmB,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAShB;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,GAAG,EAAE,cAAc,EACnB,KAAK,CAAC,EAAE,YAAY,GACnB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IA8E3C;;;;;;;OAOG;IACG,uBAAuB,CAC3B,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;CAG5C;AAED,eAAO,MAAM,kBAAkB,0BAAiC,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { signObject, unsignObject } from '$cookieSigner';
|
|
3
|
+
import { getUserSessionCookieName } from '$sessionCookie';
|
|
4
|
+
import { USER_SESSION_DURATION_SEC, USER_SESSION_MAX_LIFETIME_SEC, USER_SESSION_RENEWAL_THRESHOLD_SEC, } from '$userSessionConstants';
|
|
5
|
+
import { verifyRequestOrigin } from '$verifyRequestOrigin';
|
|
6
|
+
import { InvalidSessionError } from '%authContextImports';
|
|
7
|
+
import { DEFAULT_USER_ROLES } from '%authRolesImports';
|
|
8
|
+
import { config } from '%configServiceImports';
|
|
9
|
+
import { ForbiddenError } from '%errorHandlerServiceImports';
|
|
10
|
+
import { prisma } from '%prismaImports';
|
|
11
|
+
import { randomBytes } from 'node:crypto';
|
|
12
|
+
const COOKIE_OPTIONS = {
|
|
13
|
+
httpOnly: true,
|
|
14
|
+
sameSite: 'lax',
|
|
15
|
+
secure: config.APP_ENVIRONMENT !== 'dev',
|
|
16
|
+
maxAge: USER_SESSION_DURATION_SEC,
|
|
17
|
+
path: '/',
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Validates the expiry of a user session and determines if it needs to be renewed.
|
|
21
|
+
*
|
|
22
|
+
* @param currentDate The current date and time.
|
|
23
|
+
* @param userSession The session details.
|
|
24
|
+
* @param userSession.expiresAt The date and time when the session expires.
|
|
25
|
+
* @param userSession.createdAt The date and time when the session was created.
|
|
26
|
+
* @param userSession.renewedAt The date and time when the session was last renewed.
|
|
27
|
+
* @returns The validity of the session and the new expiry date if applicable.
|
|
28
|
+
*/
|
|
29
|
+
function validateSessionExpiry(currentDate, userSession) {
|
|
30
|
+
// check if session is expired
|
|
31
|
+
if (userSession.expiresAt < currentDate) {
|
|
32
|
+
return { valid: false, newExpiry: null };
|
|
33
|
+
}
|
|
34
|
+
// check if session needs renewal
|
|
35
|
+
const shouldRenewBy = userSession.renewedAt.getTime() + USER_SESSION_RENEWAL_THRESHOLD_SEC * 1000;
|
|
36
|
+
if (shouldRenewBy < currentDate.getTime()) {
|
|
37
|
+
const newExpiry = currentDate.getTime() + USER_SESSION_DURATION_SEC * 1000;
|
|
38
|
+
const maxExpiry = USER_SESSION_MAX_LIFETIME_SEC === 0
|
|
39
|
+
? undefined
|
|
40
|
+
: userSession.createdAt.getTime() +
|
|
41
|
+
USER_SESSION_MAX_LIFETIME_SEC * 1000;
|
|
42
|
+
return {
|
|
43
|
+
valid: true,
|
|
44
|
+
newExpiry: new Date(Math.min(newExpiry, maxExpiry ?? newExpiry)),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return { valid: true, newExpiry: null };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Generates a session token
|
|
51
|
+
*
|
|
52
|
+
* @returns The session token
|
|
53
|
+
*/
|
|
54
|
+
function generateSessionToken() {
|
|
55
|
+
return randomBytes(16).toString('base64url');
|
|
56
|
+
}
|
|
57
|
+
export class CookieUserSessionService {
|
|
58
|
+
/**
|
|
59
|
+
* Creates a user session cookie and sets it in the response.
|
|
60
|
+
*
|
|
61
|
+
* @param userId The ID of the user for whom the session is being created.
|
|
62
|
+
* @param context The request service context
|
|
63
|
+
* @param currentDate The current date and time. Defaults to the current date and time.
|
|
64
|
+
* @returns The session payload
|
|
65
|
+
*/
|
|
66
|
+
async createSession(userId, context, currentDate = new Date()) {
|
|
67
|
+
const token = generateSessionToken();
|
|
68
|
+
const expiresAt = new Date(currentDate.getTime() + USER_SESSION_DURATION_SEC * 1000);
|
|
69
|
+
await TPL_PRISMA_USER_SESSION.create({
|
|
70
|
+
data: {
|
|
71
|
+
user: { connect: { id: userId } },
|
|
72
|
+
token,
|
|
73
|
+
expiresAt,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
// Fetch user roles to include in the session payload
|
|
77
|
+
const user = await prisma.user.findUniqueOrThrow({
|
|
78
|
+
where: { id: userId },
|
|
79
|
+
select: { roles: true },
|
|
80
|
+
});
|
|
81
|
+
const roles = [
|
|
82
|
+
...DEFAULT_USER_ROLES,
|
|
83
|
+
...user.roles.map((role) => role.role),
|
|
84
|
+
];
|
|
85
|
+
const cookieName = getUserSessionCookieName(context.reqInfo.headers);
|
|
86
|
+
const cookieValue = signObject({ token }, config.AUTH_SECRET);
|
|
87
|
+
context.cookieStore.set(cookieName, cookieValue, COOKIE_OPTIONS);
|
|
88
|
+
return { userId, expiresAt, roles };
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Ends the user session by clearing the session cookie and deleting the session from the database.
|
|
92
|
+
*
|
|
93
|
+
* @param sessionInfo The session info
|
|
94
|
+
* @param context The request service context
|
|
95
|
+
*/
|
|
96
|
+
async clearSession(sessionInfo, context) {
|
|
97
|
+
await TPL_PRISMA_USER_SESSION.delete({
|
|
98
|
+
where: { id: sessionInfo.id },
|
|
99
|
+
});
|
|
100
|
+
const cookieName = getUserSessionCookieName(context.reqInfo.headers);
|
|
101
|
+
context.cookieStore.clear(cookieName, COOKIE_OPTIONS);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Retrieves the user session information from the request.
|
|
105
|
+
*
|
|
106
|
+
* @param req - The Fastify request object containing the cookies.
|
|
107
|
+
* @param reply - The Fastify reply object used to set or clear cookies.
|
|
108
|
+
* @param currentDate - The current date used for session validation. Defaults to the current date and time.
|
|
109
|
+
* @returns A promise that resolves to the authenticated user session information or null if the session is invalid.
|
|
110
|
+
* @throws {InvalidSessionError} If the session is invalid or expired.
|
|
111
|
+
*/
|
|
112
|
+
async getSessionInfoFromRequest(req, reply) {
|
|
113
|
+
const currentDate = new Date();
|
|
114
|
+
const cookieName = getUserSessionCookieName(req.headers);
|
|
115
|
+
// Check if the session cookie is present
|
|
116
|
+
const sessionCookieValue = req.cookies[cookieName];
|
|
117
|
+
if (!sessionCookieValue)
|
|
118
|
+
return undefined;
|
|
119
|
+
// Check Origin header for non-GET/HEAD requests to prevent CSRF attacks
|
|
120
|
+
if ((req.method !== 'GET' ||
|
|
121
|
+
req.headers.upgrade?.toLowerCase() === 'websocket') &&
|
|
122
|
+
req.method !== 'HEAD' &&
|
|
123
|
+
!verifyRequestOrigin(req, [req.host, ...config.ALLOWED_ORIGINS])) {
|
|
124
|
+
throw new ForbiddenError('Invalid Origin header');
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
// Unsign the session cookie
|
|
128
|
+
const sessionCookieResult = unsignObject(sessionCookieValue, config.AUTH_SECRET);
|
|
129
|
+
if (!sessionCookieResult)
|
|
130
|
+
throw new InvalidSessionError();
|
|
131
|
+
const { token } = sessionCookieResult;
|
|
132
|
+
if (typeof token !== 'string')
|
|
133
|
+
throw new InvalidSessionError();
|
|
134
|
+
// Fetch and validate user session
|
|
135
|
+
const userSession = await TPL_PRISMA_USER_SESSION.findUnique({
|
|
136
|
+
where: { token },
|
|
137
|
+
include: { user: { select: { id: true, roles: true } } },
|
|
138
|
+
});
|
|
139
|
+
if (!userSession)
|
|
140
|
+
throw new InvalidSessionError();
|
|
141
|
+
const sessionExpiryResult = validateSessionExpiry(currentDate, userSession);
|
|
142
|
+
if (!sessionExpiryResult.valid)
|
|
143
|
+
throw new InvalidSessionError('Session expired');
|
|
144
|
+
// renew the session if needed
|
|
145
|
+
if (sessionExpiryResult.newExpiry && reply) {
|
|
146
|
+
await TPL_PRISMA_USER_SESSION.update({
|
|
147
|
+
where: { id: userSession.id },
|
|
148
|
+
data: {
|
|
149
|
+
renewedAt: currentDate,
|
|
150
|
+
expiresAt: sessionExpiryResult.newExpiry,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
const newSignedCookie = signObject({ token }, config.AUTH_SECRET);
|
|
154
|
+
reply.setCookie(cookieName, newSignedCookie, COOKIE_OPTIONS);
|
|
155
|
+
}
|
|
156
|
+
const { user } = userSession;
|
|
157
|
+
const expiresAt = sessionExpiryResult.newExpiry ?? userSession.expiresAt;
|
|
158
|
+
return {
|
|
159
|
+
id: userSession.id,
|
|
160
|
+
type: 'user',
|
|
161
|
+
roles: [
|
|
162
|
+
...DEFAULT_USER_ROLES,
|
|
163
|
+
...user.roles.map((role) => role.role),
|
|
164
|
+
],
|
|
165
|
+
userId: user.id,
|
|
166
|
+
expiresAt,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
catch (err) {
|
|
170
|
+
// clear the cookie if it's invalid
|
|
171
|
+
if (err instanceof InvalidSessionError && reply) {
|
|
172
|
+
reply.clearCookie(cookieName, COOKIE_OPTIONS);
|
|
173
|
+
}
|
|
174
|
+
throw err;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Retrieves the user session information from the authentication token
|
|
179
|
+
*
|
|
180
|
+
* Note: Since we use cookies, we ignore the authToken parameter
|
|
181
|
+
*
|
|
182
|
+
* @param req The request object
|
|
183
|
+
* @returns The session info or undefined if no session is found
|
|
184
|
+
*/
|
|
185
|
+
async getSessionInfoFromToken(req) {
|
|
186
|
+
return this.getSessionInfoFromRequest(req, undefined);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
export const userSessionService = new CookieUserSessionService();
|
|
190
|
+
//# sourceMappingURL=user-session.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-session.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAYd,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,MAAM,cAAc,GAA2B;IAC7C,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,MAAM,CAAC,eAAe,KAAK,KAAK;IACxC,MAAM,EAAE,yBAAyB;IACjC,IAAI,EAAE,GAAG;CACV,CAAC;AAEF;;;;;;;;;GASG;AACH,SAAS,qBAAqB,CAC5B,WAAiB,EACjB,WAIC;IAED,8BAA8B;IAC9B,IAAI,WAAW,CAAC,SAAS,GAAG,WAAW,EAAE,CAAC;QACxC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;IAED,iCAAiC;IACjC,MAAM,aAAa,GACjB,WAAW,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,kCAAkC,GAAG,IAAI,CAAC;IAE9E,IAAI,aAAa,GAAG,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,yBAAyB,GAAG,IAAI,CAAC;QAC3E,MAAM,SAAS,GACb,6BAA6B,KAAK,CAAC;YACjC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,EAAE;gBAC/B,6BAA6B,GAAG,IAAI,CAAC;QAC3C,OAAO;YACL,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,IAAI,SAAS,CAAC,CAAC;SACjE,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB;IAC3B,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,OAAO,wBAAwB;IACnC;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,MAAc,EACd,OAA8B,EAC9B,cAAoB,IAAI,IAAI,EAAE;QAE9B,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,IAAI,IAAI,CACxB,WAAW,CAAC,OAAO,EAAE,GAAG,yBAAyB,GAAG,IAAI,CACzD,CAAC;QAEF,MAAM,uBAAuB,CAAC,MAAM,CAAC;YACnC,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;gBACjC,KAAK;gBACL,SAAS;aACV;SACF,CAAC,CAAC;QAEH,qDAAqD;QACrD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC/C,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;YACrB,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;SACxB,CAAC,CAAC;QAEH,MAAM,KAAK,GAAwB;YACjC,GAAG,kBAAkB;YACrB,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAgB,CAAC;SACnD,CAAC;QAEF,MAAM,UAAU,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,WAAW,GAAG,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAE9D,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;QAEjE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,WAAgC,EAChC,OAA8B;QAE9B,MAAM,uBAAuB,CAAC,MAAM,CAAC;YACnC,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE;SAC9B,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,yBAAyB,CAC7B,GAAmB,EACnB,KAAoB;QAEpB,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QAE/B,MAAM,UAAU,GAAG,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEzD,yCAAyC;QACzC,MAAM,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC,kBAAkB;YAAE,OAAO,SAAS,CAAC;QAE1C,wEAAwE;QACxE,IACE,CAAC,GAAG,CAAC,MAAM,KAAK,KAAK;YACnB,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,CAAC;YACrD,GAAG,CAAC,MAAM,KAAK,MAAM;YACrB,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,EAChE,CAAC;YACD,MAAM,IAAI,cAAc,CAAC,uBAAuB,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,CAAC;YACH,4BAA4B;YAC5B,MAAM,mBAAmB,GAAG,YAAY,CACtC,kBAAkB,EAClB,MAAM,CAAC,WAAW,CACe,CAAC;YACpC,IAAI,CAAC,mBAAmB;gBAAE,MAAM,IAAI,mBAAmB,EAAE,CAAC;YAE1D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC;YACtC,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,MAAM,IAAI,mBAAmB,EAAE,CAAC;YAE/D,kCAAkC;YAClC,MAAM,WAAW,GAAG,MAAM,uBAAuB,CAAC,UAAU,CAAC;gBAC3D,KAAK,EAAE,EAAE,KAAK,EAAE;gBAChB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;aACzD,CAAC,CAAC;YACH,IAAI,CAAC,WAAW;gBAAE,MAAM,IAAI,mBAAmB,EAAE,CAAC;YAElD,MAAM,mBAAmB,GAAG,qBAAqB,CAC/C,WAAW,EACX,WAAW,CACZ,CAAC;YACF,IAAI,CAAC,mBAAmB,CAAC,KAAK;gBAC5B,MAAM,IAAI,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;YAEnD,8BAA8B;YAC9B,IAAI,mBAAmB,CAAC,SAAS,IAAI,KAAK,EAAE,CAAC;gBAC3C,MAAM,uBAAuB,CAAC,MAAM,CAAC;oBACnC,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE;oBAC7B,IAAI,EAAE;wBACJ,SAAS,EAAE,WAAW;wBACtB,SAAS,EAAE,mBAAmB,CAAC,SAAS;qBACzC;iBACF,CAAC,CAAC;gBACH,MAAM,eAAe,GAAG,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;gBAClE,KAAK,CAAC,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;YAC/D,CAAC;YAED,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;YAC7B,MAAM,SAAS,GAAG,mBAAmB,CAAC,SAAS,IAAI,WAAW,CAAC,SAAS,CAAC;YAEzE,OAAO;gBACL,EAAE,EAAE,WAAW,CAAC,EAAE;gBAClB,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE;oBACL,GAAG,kBAAkB;oBACrB,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAgB,CAAC;iBACnD;gBACD,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,SAAS;aACV,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,mCAAmC;YACnC,IAAI,GAAG,YAAY,mBAAmB,IAAI,KAAK,EAAE,CAAC;gBAChD,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,uBAAuB,CAC3B,GAAmB;QAEnB,OAAO,IAAI,CAAC,yBAAyB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;CACF;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import type { AuthUserSessionInfo } from '%authContextImports';
|
|
4
|
+
import type { AuthRole } from '%authRolesImports';
|
|
5
|
+
import type { RequestServiceContext } from '%requestServiceContextImports';
|
|
6
|
+
import type {
|
|
7
|
+
UserSessionPayload,
|
|
8
|
+
UserSessionService,
|
|
9
|
+
} from '%userSessionTypesImports';
|
|
10
|
+
import type { CookieSerializeOptions } from '@fastify/cookie';
|
|
11
|
+
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
12
|
+
|
|
13
|
+
import { signObject, unsignObject } from '$cookieSigner';
|
|
14
|
+
import { getUserSessionCookieName } from '$sessionCookie';
|
|
15
|
+
import {
|
|
16
|
+
USER_SESSION_DURATION_SEC,
|
|
17
|
+
USER_SESSION_MAX_LIFETIME_SEC,
|
|
18
|
+
USER_SESSION_RENEWAL_THRESHOLD_SEC,
|
|
19
|
+
} from '$userSessionConstants';
|
|
20
|
+
import { verifyRequestOrigin } from '$verifyRequestOrigin';
|
|
21
|
+
import { InvalidSessionError } from '%authContextImports';
|
|
22
|
+
import { DEFAULT_USER_ROLES } from '%authRolesImports';
|
|
23
|
+
import { config } from '%configServiceImports';
|
|
24
|
+
import { ForbiddenError } from '%errorHandlerServiceImports';
|
|
25
|
+
import { prisma } from '%prismaImports';
|
|
26
|
+
import { randomBytes } from 'node:crypto';
|
|
27
|
+
|
|
28
|
+
interface SessionCookieValue {
|
|
29
|
+
// Session token
|
|
30
|
+
token: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const COOKIE_OPTIONS: CookieSerializeOptions = {
|
|
34
|
+
httpOnly: true,
|
|
35
|
+
sameSite: 'lax',
|
|
36
|
+
secure: config.APP_ENVIRONMENT !== 'dev',
|
|
37
|
+
maxAge: USER_SESSION_DURATION_SEC,
|
|
38
|
+
path: '/',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Validates the expiry of a user session and determines if it needs to be renewed.
|
|
43
|
+
*
|
|
44
|
+
* @param currentDate The current date and time.
|
|
45
|
+
* @param userSession The session details.
|
|
46
|
+
* @param userSession.expiresAt The date and time when the session expires.
|
|
47
|
+
* @param userSession.createdAt The date and time when the session was created.
|
|
48
|
+
* @param userSession.renewedAt The date and time when the session was last renewed.
|
|
49
|
+
* @returns The validity of the session and the new expiry date if applicable.
|
|
50
|
+
*/
|
|
51
|
+
function validateSessionExpiry(
|
|
52
|
+
currentDate: Date,
|
|
53
|
+
userSession: {
|
|
54
|
+
expiresAt: Date;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
renewedAt: Date;
|
|
57
|
+
},
|
|
58
|
+
): { valid: boolean; newExpiry: Date | null } {
|
|
59
|
+
// check if session is expired
|
|
60
|
+
if (userSession.expiresAt < currentDate) {
|
|
61
|
+
return { valid: false, newExpiry: null };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// check if session needs renewal
|
|
65
|
+
const shouldRenewBy =
|
|
66
|
+
userSession.renewedAt.getTime() + USER_SESSION_RENEWAL_THRESHOLD_SEC * 1000;
|
|
67
|
+
|
|
68
|
+
if (shouldRenewBy < currentDate.getTime()) {
|
|
69
|
+
const newExpiry = currentDate.getTime() + USER_SESSION_DURATION_SEC * 1000;
|
|
70
|
+
const maxExpiry =
|
|
71
|
+
USER_SESSION_MAX_LIFETIME_SEC === 0
|
|
72
|
+
? undefined
|
|
73
|
+
: userSession.createdAt.getTime() +
|
|
74
|
+
USER_SESSION_MAX_LIFETIME_SEC * 1000;
|
|
75
|
+
return {
|
|
76
|
+
valid: true,
|
|
77
|
+
newExpiry: new Date(Math.min(newExpiry, maxExpiry ?? newExpiry)),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return { valid: true, newExpiry: null };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Generates a session token
|
|
86
|
+
*
|
|
87
|
+
* @returns The session token
|
|
88
|
+
*/
|
|
89
|
+
function generateSessionToken(): string {
|
|
90
|
+
return randomBytes(16).toString('base64url');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export class CookieUserSessionService implements UserSessionService {
|
|
94
|
+
/**
|
|
95
|
+
* Creates a user session cookie and sets it in the response.
|
|
96
|
+
*
|
|
97
|
+
* @param userId The ID of the user for whom the session is being created.
|
|
98
|
+
* @param context The request service context
|
|
99
|
+
* @param currentDate The current date and time. Defaults to the current date and time.
|
|
100
|
+
* @returns The session payload
|
|
101
|
+
*/
|
|
102
|
+
async createSession(
|
|
103
|
+
userId: string,
|
|
104
|
+
context: RequestServiceContext,
|
|
105
|
+
currentDate: Date = new Date(),
|
|
106
|
+
): Promise<UserSessionPayload> {
|
|
107
|
+
const token = generateSessionToken();
|
|
108
|
+
const expiresAt = new Date(
|
|
109
|
+
currentDate.getTime() + USER_SESSION_DURATION_SEC * 1000,
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
await TPL_PRISMA_USER_SESSION.create({
|
|
113
|
+
data: {
|
|
114
|
+
user: { connect: { id: userId } },
|
|
115
|
+
token,
|
|
116
|
+
expiresAt,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// Fetch user roles to include in the session payload
|
|
121
|
+
const user = await prisma.user.findUniqueOrThrow({
|
|
122
|
+
where: { id: userId },
|
|
123
|
+
select: { roles: true },
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const roles: readonly AuthRole[] = [
|
|
127
|
+
...DEFAULT_USER_ROLES,
|
|
128
|
+
...user.roles.map((role) => role.role as AuthRole),
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
const cookieName = getUserSessionCookieName(context.reqInfo.headers);
|
|
132
|
+
const cookieValue = signObject({ token }, config.AUTH_SECRET);
|
|
133
|
+
|
|
134
|
+
context.cookieStore.set(cookieName, cookieValue, COOKIE_OPTIONS);
|
|
135
|
+
|
|
136
|
+
return { userId, expiresAt, roles };
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Ends the user session by clearing the session cookie and deleting the session from the database.
|
|
141
|
+
*
|
|
142
|
+
* @param sessionInfo The session info
|
|
143
|
+
* @param context The request service context
|
|
144
|
+
*/
|
|
145
|
+
async clearSession(
|
|
146
|
+
sessionInfo: AuthUserSessionInfo,
|
|
147
|
+
context: RequestServiceContext,
|
|
148
|
+
): Promise<void> {
|
|
149
|
+
await TPL_PRISMA_USER_SESSION.delete({
|
|
150
|
+
where: { id: sessionInfo.id },
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const cookieName = getUserSessionCookieName(context.reqInfo.headers);
|
|
154
|
+
context.cookieStore.clear(cookieName, COOKIE_OPTIONS);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Retrieves the user session information from the request.
|
|
159
|
+
*
|
|
160
|
+
* @param req - The Fastify request object containing the cookies.
|
|
161
|
+
* @param reply - The Fastify reply object used to set or clear cookies.
|
|
162
|
+
* @param currentDate - The current date used for session validation. Defaults to the current date and time.
|
|
163
|
+
* @returns A promise that resolves to the authenticated user session information or null if the session is invalid.
|
|
164
|
+
* @throws {InvalidSessionError} If the session is invalid or expired.
|
|
165
|
+
*/
|
|
166
|
+
async getSessionInfoFromRequest(
|
|
167
|
+
req: FastifyRequest,
|
|
168
|
+
reply?: FastifyReply,
|
|
169
|
+
): Promise<AuthUserSessionInfo | undefined> {
|
|
170
|
+
const currentDate = new Date();
|
|
171
|
+
|
|
172
|
+
const cookieName = getUserSessionCookieName(req.headers);
|
|
173
|
+
|
|
174
|
+
// Check if the session cookie is present
|
|
175
|
+
const sessionCookieValue = req.cookies[cookieName];
|
|
176
|
+
if (!sessionCookieValue) return undefined;
|
|
177
|
+
|
|
178
|
+
// Check Origin header for non-GET/HEAD requests to prevent CSRF attacks
|
|
179
|
+
if (
|
|
180
|
+
(req.method !== 'GET' ||
|
|
181
|
+
req.headers.upgrade?.toLowerCase() === 'websocket') &&
|
|
182
|
+
req.method !== 'HEAD' &&
|
|
183
|
+
!verifyRequestOrigin(req, [req.host, ...config.ALLOWED_ORIGINS])
|
|
184
|
+
) {
|
|
185
|
+
throw new ForbiddenError('Invalid Origin header');
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
// Unsign the session cookie
|
|
189
|
+
const sessionCookieResult = unsignObject(
|
|
190
|
+
sessionCookieValue,
|
|
191
|
+
config.AUTH_SECRET,
|
|
192
|
+
) as SessionCookieValue | undefined;
|
|
193
|
+
if (!sessionCookieResult) throw new InvalidSessionError();
|
|
194
|
+
|
|
195
|
+
const { token } = sessionCookieResult;
|
|
196
|
+
if (typeof token !== 'string') throw new InvalidSessionError();
|
|
197
|
+
|
|
198
|
+
// Fetch and validate user session
|
|
199
|
+
const userSession = await TPL_PRISMA_USER_SESSION.findUnique({
|
|
200
|
+
where: { token },
|
|
201
|
+
include: { user: { select: { id: true, roles: true } } },
|
|
202
|
+
});
|
|
203
|
+
if (!userSession) throw new InvalidSessionError();
|
|
204
|
+
|
|
205
|
+
const sessionExpiryResult = validateSessionExpiry(
|
|
206
|
+
currentDate,
|
|
207
|
+
userSession,
|
|
208
|
+
);
|
|
209
|
+
if (!sessionExpiryResult.valid)
|
|
210
|
+
throw new InvalidSessionError('Session expired');
|
|
211
|
+
|
|
212
|
+
// renew the session if needed
|
|
213
|
+
if (sessionExpiryResult.newExpiry && reply) {
|
|
214
|
+
await TPL_PRISMA_USER_SESSION.update({
|
|
215
|
+
where: { id: userSession.id },
|
|
216
|
+
data: {
|
|
217
|
+
renewedAt: currentDate,
|
|
218
|
+
expiresAt: sessionExpiryResult.newExpiry,
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
const newSignedCookie = signObject({ token }, config.AUTH_SECRET);
|
|
222
|
+
reply.setCookie(cookieName, newSignedCookie, COOKIE_OPTIONS);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const { user } = userSession;
|
|
226
|
+
const expiresAt = sessionExpiryResult.newExpiry ?? userSession.expiresAt;
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
id: userSession.id,
|
|
230
|
+
type: 'user',
|
|
231
|
+
roles: [
|
|
232
|
+
...DEFAULT_USER_ROLES,
|
|
233
|
+
...user.roles.map((role) => role.role as AuthRole),
|
|
234
|
+
],
|
|
235
|
+
userId: user.id,
|
|
236
|
+
expiresAt,
|
|
237
|
+
};
|
|
238
|
+
} catch (err) {
|
|
239
|
+
// clear the cookie if it's invalid
|
|
240
|
+
if (err instanceof InvalidSessionError && reply) {
|
|
241
|
+
reply.clearCookie(cookieName, COOKIE_OPTIONS);
|
|
242
|
+
}
|
|
243
|
+
throw err;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Retrieves the user session information from the authentication token
|
|
249
|
+
*
|
|
250
|
+
* Note: Since we use cookies, we ignore the authToken parameter
|
|
251
|
+
*
|
|
252
|
+
* @param req The request object
|
|
253
|
+
* @returns The session info or undefined if no session is found
|
|
254
|
+
*/
|
|
255
|
+
async getSessionInfoFromToken(
|
|
256
|
+
req: FastifyRequest,
|
|
257
|
+
): Promise<AuthUserSessionInfo | undefined> {
|
|
258
|
+
return this.getSessionInfoFromRequest(req, undefined);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export const userSessionService = new CookieUserSessionService();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cookie signing utilities
|
|
3
|
+
* Based on node-cookie-signature by TJ Holowaychuk
|
|
4
|
+
* Source: https://github.com/tj/node-cookie-signature
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Sign the given `val` with `secret` using HMAC-SHA256.
|
|
8
|
+
*
|
|
9
|
+
* @param val - The value to sign.
|
|
10
|
+
* @param secret - The secret key to use for signing.
|
|
11
|
+
* @returns The signed value.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sign(val: string, secret: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Unsign and decode the given `input` with `secret`,
|
|
16
|
+
*
|
|
17
|
+
* @param input - The signed cookie string to unsign.
|
|
18
|
+
* @param secret - The secret key used for signing.
|
|
19
|
+
* @returns The unsigned value or undefined if the signature is invalid.
|
|
20
|
+
*/
|
|
21
|
+
export declare function unsign(input: string, secret: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Sign an object by JSON stringifying and base64 encoding it, then signing with secret.
|
|
24
|
+
*
|
|
25
|
+
* @param obj - The object to sign.
|
|
26
|
+
* @param secret - The secret key to use for signing.
|
|
27
|
+
* @returns The signed encoded object.
|
|
28
|
+
*/
|
|
29
|
+
export declare function signObject(obj: unknown, secret: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Unsign and decode an object that was signed with signObject.
|
|
32
|
+
*
|
|
33
|
+
* @param input - The signed encoded object string to unsign.
|
|
34
|
+
* @param secret - The secret key used for signing.
|
|
35
|
+
* @returns The decoded object or undefined if the signature is invalid.
|
|
36
|
+
*/
|
|
37
|
+
export declare function unsignObject(input: string, secret: string): unknown;
|
|
38
|
+
//# sourceMappingURL=cookie-signer.d.ts.map
|
package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookie-signer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYxE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAUnE"}
|