@baseplate-dev/plugin-auth 0.6.2 → 0.6.4
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 +36 -0
- package/LICENSE +114 -123
- package/dist/auth/core/common.d.ts.map +1 -1
- package/dist/auth/core/common.js +1 -0
- package/dist/auth/core/common.js.map +1 -1
- package/dist/auth/core/components/role-editor-form/role-dialog.d.ts +1 -3
- package/dist/auth/core/components/role-editor-form/role-dialog.d.ts.map +1 -1
- package/dist/auth/core/components/role-editor-form/role-dialog.js +10 -10
- package/dist/auth/core/components/role-editor-form/role-dialog.js.map +1 -1
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-log-out.ts +2 -4
- package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-session.ts +1 -2
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +37 -25
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +111 -75
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +37 -25
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +148 -100
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +2 -2
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -1
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/{auth/login.tsx → login.tsx} +11 -13
- package/dist/better-auth/generators/react/better-auth-pages/templates/routes/{auth/register.tsx → register.tsx} +11 -13
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +74 -50
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +37 -25
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +37 -25
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +37 -25
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -1
- package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +3 -6
- package/dist/better-auth/generators/react/react-better-auth/templates/src/services/auth-client.ts +0 -2
- package/dist/common/components/auth-config-tabs.d.ts.map +1 -1
- package/dist/common/components/auth-config-tabs.js +1 -1
- package/dist/common/components/auth-config-tabs.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +78 -64
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +5 -3
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +78 -64
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +39 -32
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +39 -32
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +2 -2
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +6 -6
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +9 -12
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +78 -64
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +5 -3
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +78 -64
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +39 -32
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +78 -64
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +2 -2
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +6 -6
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +9 -12
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +37 -25
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.js +3 -2
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +7 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +3 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +6 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +5 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +5 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +4 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +6 -1
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +2 -7
- package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +6 -21
- package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +2 -7
- package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +8 -28
- package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +2 -2
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +3 -3
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +43 -33
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +37 -4
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +240 -196
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +39 -32
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +363 -296
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +5 -2
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +3 -10
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +6 -10
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +78 -64
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +39 -32
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +78 -64
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +39 -32
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +6 -2
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +1 -0
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +1 -0
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-CIVhaGqo.js → __federation_expose_authCoreCommon-D8SAyij-.js} +4 -3
- package/dist/web/assets/__federation_expose_authCoreCommon-D8SAyij-.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreWeb-N-mh42Bs.js → __federation_expose_authCoreWeb-BSv8GVI2.js} +60 -65
- package/dist/web/assets/__federation_expose_authCoreWeb-BSv8GVI2.js.map +1 -0
- package/dist/web/assets/{__federation_expose_better-authCoreCommon-BIU3Fg7K.js → __federation_expose_better-authCoreCommon-BJhkN6zV.js} +3 -3
- package/dist/web/assets/{__federation_expose_better-authCoreCommon-BIU3Fg7K.js.map → __federation_expose_better-authCoreCommon-BJhkN6zV.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_better-authCoreWeb-CMhPrXPA.js → __federation_expose_better-authCoreWeb-2kA00dBg.js} +5 -5
- package/dist/web/assets/{__federation_expose_better-authCoreWeb-CMhPrXPA.js.map → __federation_expose_better-authCoreWeb-2kA00dBg.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DvHe9w29.js → __federation_expose_local-authAdminCommon-IuYupUXE.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DvHe9w29.js.map → __federation_expose_local-authAdminCommon-IuYupUXE.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-CLU9aEy9.js → __federation_expose_local-authAdminWeb-BzhksqwO.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-CLU9aEy9.js.map → __federation_expose_local-authAdminWeb-BzhksqwO.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-DbuvGG7o.js → __federation_expose_local-authCoreCommon-DO5xRAoM.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-DbuvGG7o.js.map → __federation_expose_local-authCoreCommon-DO5xRAoM.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-BY-mP3uS.js → __federation_expose_local-authCoreWeb-QdXa2aao.js} +23 -7
- package/dist/web/assets/__federation_expose_local-authCoreWeb-QdXa2aao.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js → __federation_expose_placeholder-authCoreCommon-hGIPuBy3.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map → __federation_expose_placeholder-authCoreCommon-hGIPuBy3.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js → __federation_expose_placeholder-authCoreWeb-P4Qq8Zf6.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map → __federation_expose_placeholder-authCoreWeb-P4Qq8Zf6.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-BLFDCY-V.js → __federation_fn_import-CzLgVaFb.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-BLFDCY-V.js.map → __federation_fn_import-CzLgVaFb.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-bRU6KpPk.js → web-DA-fkeD5.js} +12 -10
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DA-fkeD5.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-CQKLkNsU.js → project-builder-lib-zJirGIS1.js} +321 -36
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-zJirGIS1.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-DhyoEUTy.js → ui-components-Ds8y9Suz.js} +49747 -33379
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-Ds8y9Suz.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-9w-0yxVZ.js → utils-DnBM79-7.js} +3 -2
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-DnBM79-7.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CbExBaoL.js → react-router-BoEohCHh.js} +3 -200
- package/dist/web/assets/__federation_shared_@tanstack/react-router-BoEohCHh.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-BL50g0cJ.js → get-auth-plugin-definition-DM6kosCC.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BL50g0cJ.js.map → get-auth-plugin-definition-DM6kosCC.js.map} +1 -1
- package/dist/web/assets/{index-B_A3cgiy.js → index-EshpyU4T.js} +5 -5
- package/dist/web/assets/{index-B_A3cgiy.js.map → index-EshpyU4T.js.map} +1 -1
- package/dist/web/assets/{index.esm-BraHxHLB.js → index.esm-CYY7gyrG.js} +2 -2
- package/dist/web/assets/{index.esm-BraHxHLB.js.map → index.esm-CYY7gyrG.js.map} +1 -1
- package/dist/web/assets/{model-utils-BfcjfzCn.js → model-utils-WWo9T1Zx.js} +30 -2
- package/dist/web/assets/{model-utils-BfcjfzCn.js.map → model-utils-WWo9T1Zx.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-CXnKUJ1l.js → plugin-definition-BCrs3YSY.js} +2 -2
- package/dist/web/assets/{plugin-definition-CXnKUJ1l.js.map → plugin-definition-BCrs3YSY.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-Ckl5hjD1.js → plugin-definition-BwAJGzRn.js} +4 -3
- package/dist/web/assets/plugin-definition-BwAJGzRn.js.map +1 -0
- package/dist/web/assets/{plugin-definition-D26rR8AB.js → plugin-definition-CqP9VmOQ.js} +2 -2
- package/dist/web/assets/{plugin-definition-D26rR8AB.js.map → plugin-definition-CqP9VmOQ.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-DJzXScRp.js → plugin-definition-y6VVQ5_O.js} +2 -2
- package/dist/web/assets/{plugin-definition-DJzXScRp.js.map → plugin-definition-y6VVQ5_O.js.map} +1 -1
- package/dist/web/assets/{react-CL9M_wyN.js → react-B6Fz4KB7.js} +2 -2
- package/dist/web/assets/{react-CL9M_wyN.js.map → react-B6Fz4KB7.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +10 -10
- package/dist/web/assets/{styles-tkrWV-ZE.js → styles-0yxEwdyo.js} +24 -14
- package/dist/web/assets/styles-0yxEwdyo.js.map +1 -0
- package/dist/web/assets/with-selector-DTXBONcE.js +201 -0
- package/dist/web/assets/with-selector-DTXBONcE.js.map +1 -0
- package/package.json +19 -22
- package/dist/web/assets/__federation_expose_authCoreCommon-CIVhaGqo.js.map +0 -1
- package/dist/web/assets/__federation_expose_authCoreWeb-N-mh42Bs.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-BY-mP3uS.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-bRU6KpPk.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CQKLkNsU.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js.map +0 -1
- package/dist/web/assets/__federation_shared_@tanstack/react-router-CbExBaoL.js.map +0 -1
- package/dist/web/assets/plugin-definition-Ckl5hjD1.js.map +0 -1
- package/dist/web/assets/styles-tkrWV-ZE.js.map +0 -1
package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js
CHANGED
|
@@ -9,6 +9,7 @@ import { LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED as GENERATED_TEMPLATES }
|
|
|
9
9
|
const descriptorSchema = z.object({
|
|
10
10
|
adminRoles: z.array(z.string()),
|
|
11
11
|
devWebDomainPort: z.number(),
|
|
12
|
+
requireNameOnRegistration: z.boolean(),
|
|
12
13
|
});
|
|
13
14
|
/**
|
|
14
15
|
* Sets up email / password authentication
|
|
@@ -17,7 +18,7 @@ export const authEmailPasswordGenerator = createGenerator({
|
|
|
17
18
|
name: 'local-auth/core/auth-email-password',
|
|
18
19
|
generatorFileUrl: import.meta.url,
|
|
19
20
|
descriptorSchema,
|
|
20
|
-
buildTasks: ({ adminRoles, devWebDomainPort }) => ({
|
|
21
|
+
buildTasks: ({ adminRoles, devWebDomainPort, requireNameOnRegistration, }) => ({
|
|
21
22
|
paths: GENERATED_TEMPLATES.paths.task,
|
|
22
23
|
imports: GENERATED_TEMPLATES.imports.task,
|
|
23
24
|
renderers: GENERATED_TEMPLATES.renderers.task,
|
|
@@ -59,6 +60,11 @@ export const authEmailPasswordGenerator = createGenerator({
|
|
|
59
60
|
TPL_PASSWORD_RESET_EMAIL: TsCodeUtils.importFragment('PasswordResetEmail', transactionalLibPackageName),
|
|
60
61
|
TPL_PASSWORD_CHANGED_EMAIL: TsCodeUtils.importFragment('PasswordChangedEmail', transactionalLibPackageName),
|
|
61
62
|
},
|
|
63
|
+
servicesUserPassword: {
|
|
64
|
+
TPL_NAME_REQUIRED_CHECK: requireNameOnRegistration
|
|
65
|
+
? tsCodeFragment("if (!name) {\n throw new BadRequestError('Name is required', 'name-required');\n }")
|
|
66
|
+
: '',
|
|
67
|
+
},
|
|
62
68
|
},
|
|
63
69
|
}));
|
|
64
70
|
await builder.apply(renderers.servicesEmailVerification.render({
|
package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-email-password.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,sCAAsC,EACtC,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,6CAA6C,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE5G,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"auth-email-password.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-email-password/auth-email-password.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,sCAAsC,EACtC,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,6CAA6C,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE5G,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,yBAAyB,EAAE,CAAC,CAAC,OAAO,EAAE;CACvC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,eAAe,CAAC;IACxD,IAAI,EAAE,qCAAqC;IAC3C,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EACX,UAAU,EACV,gBAAgB,EAChB,yBAAyB,GAC1B,EAAE,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI;QACrC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,IAAI;Q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AAE,WAAW,CAAC,8BAA8B,CACzD,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC1C;oCACD,oBAAoB,EAClB,cAAc,CAAC,gBAAgB,EAAE,CAAC,QAAQ;iCAC7C;gCACD,qBAAqB,EAAE;oCACrB,wBAAwB,EAAE,WAAW,CAAC,cAAc,CAClD,oBAAoB,EACpB,2BAA2B,CAC5B;oCACD,0BAA0B,EAAE,WAAW,CAAC,cAAc,CACpD,sBAAsB,EACtB,2BAA2B,CAC5B;iCACF;gCACD,oBAAoB,EAAE;oCACpB,uBAAuB,EAAE,yBAAyB;wCAChD,CAAC,CAAC,cAAc,CACZ,wFAAwF,CACzF;wCACH,CAAC,CAAC,EAAE;iCACP;6BACF;yBACF,CAAC,CACH,CAAC;wBACF,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,yBAAyB,CAAC,MAAM,CAAC;4BACzC,SAAS,EAAE;gCACT,8BAA8B,EAAE,WAAW,CAAC,cAAc,CACxD,0BAA0B,EAC1B,2BAA2B,CAC5B;6BACF;yBACF,CAAC,CACH,CAAC;wBACF,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,gCAAgC,CAAC,MAAM,CAAC,EAAE,CAAC,CACtD,CAAC;oBACJ,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -219,7 +219,9 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_GENERATED: {
|
|
|
219
219
|
}, {
|
|
220
220
|
constantsPassword: {};
|
|
221
221
|
}>;
|
|
222
|
-
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
222
|
+
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
223
|
+
TPL_NAME_REQUIRED_CHECK: {};
|
|
224
|
+
}, {
|
|
223
225
|
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
224
226
|
BadRequestError: {};
|
|
225
227
|
ForbiddenError: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6CAA6C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzD,CAAC"}
|
|
@@ -96,7 +96,9 @@ export declare const moduleGroup: {
|
|
|
96
96
|
}, {
|
|
97
97
|
constantsPassword: {};
|
|
98
98
|
}>;
|
|
99
|
-
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
99
|
+
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
100
|
+
TPL_NAME_REQUIRED_CHECK: {};
|
|
101
|
+
}, {
|
|
100
102
|
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
101
103
|
BadRequestError: {};
|
|
102
104
|
ForbiddenError: {};
|
|
@@ -255,7 +257,9 @@ export declare const LOCAL_AUTH_CORE_AUTH_EMAIL_PASSWORD_TEMPLATES: {
|
|
|
255
257
|
}, {
|
|
256
258
|
constantsPassword: {};
|
|
257
259
|
}>;
|
|
258
|
-
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
260
|
+
servicesUserPassword: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
261
|
+
TPL_NAME_REQUIRED_CHECK: {};
|
|
262
|
+
}, {
|
|
259
263
|
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
260
264
|
BadRequestError: {};
|
|
261
265
|
ForbiddenError: {};
|
package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAoIA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAoIA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMvB,CAAC;AAsCF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzD,CAAC"}
|
|
@@ -96,7 +96,7 @@ const servicesUserPassword = createTsTemplateFile({
|
|
|
96
96
|
source: {
|
|
97
97
|
path: path.join(import.meta.dirname, '../templates/module/services/user-password.service.ts'),
|
|
98
98
|
},
|
|
99
|
-
variables: {},
|
|
99
|
+
variables: { TPL_NAME_REQUIRED_CHECK: {} },
|
|
100
100
|
});
|
|
101
101
|
export const moduleGroup = {
|
|
102
102
|
constantsPassword,
|
package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,oCAAoC,EACpC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8EAA8E,CAAC;AAEzH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,oBAAoB;IAC1B,cAAc,EAAE;QACd,mBAAmB,EAAE,EAAE;QACvB,mBAAmB,EAAE,EAAE;QACvB,+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;QAC5B,iBAAiB,EAAE,EAAE;QACrB,yBAAyB,EAAE,EAAE;KAC9B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uDAAuD,CACxD;KACF;IACD,SAAS,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-email-password/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,oCAAoC,EACpC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,8EAA8E,CAAC;AAEzH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,oBAAoB;IAC1B,cAAc,EAAE;QACd,mBAAmB,EAAE,EAAE;QACvB,mBAAmB,EAAE,EAAE;QACvB,+BAA+B,EAAE,EAAE;KACpC;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,qDAAqD,CACtD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;IACxD,WAAW,EAAE,EAAE,IAAI,EAAE,WAA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|
|
|
9
9
|
},
|
|
10
10
|
input: {
|
|
11
11
|
email: t.input.field({ required: true, type: 'String' }),
|
|
12
|
+
name: t.input.field({ required: false, type: 'String' }),
|
|
12
13
|
password: t.input.field({ required: true, type: 'String' }),
|
|
13
14
|
},
|
|
14
15
|
resolve: async (root, { input }, context) => registerUserWithEmailAndPassword({
|
|
15
|
-
input
|
|
16
|
+
input: {
|
|
17
|
+
...input,
|
|
18
|
+
name: input.name ?? undefined,
|
|
19
|
+
},
|
|
16
20
|
context,
|
|
17
21
|
}),
|
|
18
22
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-password.mutations.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EACL,oCAAoC,EACpC,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,CAAC,CAAC,qBAAqB,CAAC;IACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KACvD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACxD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC5D;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAC1C,gCAAgC,CAAC;QAC/B,KAAK;
|
|
1
|
+
{"version":3,"file":"user-password.mutations.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EACL,oCAAoC,EACpC,kBAAkB,EAClB,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,CAAC,CAAC,qBAAqB,CAAC;IACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KACvD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACxD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACxD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC5D;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAC1C,gCAAgC,CAAC;QAC/B,KAAK,EAAE;YACL,GAAG,KAAK;YACR,IAAI,EAAE,KAAK,C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input.field({ required: true, type: 'String' }),
|
|
20
|
+
name: t.input.field({ required: false, type: 'String' }),
|
|
20
21
|
password: t.input.field({ required: true, type: 'String' }),
|
|
21
22
|
},
|
|
22
23
|
resolve: async (root, { input }, context) =>
|
|
23
24
|
registerUserWithEmailAndPassword({
|
|
24
|
-
input
|
|
25
|
+
input: {
|
|
26
|
+
...input,
|
|
27
|
+
name: input.name ?? undefined,
|
|
28
|
+
},
|
|
25
29
|
context,
|
|
26
30
|
}),
|
|
27
31
|
}),
|
|
@@ -5,12 +5,14 @@ export declare function createUserWithEmailAndPassword({ input, }: {
|
|
|
5
5
|
input: {
|
|
6
6
|
email: string;
|
|
7
7
|
password: string;
|
|
8
|
+
name?: string;
|
|
8
9
|
};
|
|
9
10
|
}): Promise<User>;
|
|
10
11
|
export declare function registerUserWithEmailAndPassword({ input, context, }: {
|
|
11
12
|
input: {
|
|
12
13
|
email: string;
|
|
13
14
|
password: string;
|
|
15
|
+
name?: string;
|
|
14
16
|
};
|
|
15
17
|
context: RequestServiceContext;
|
|
16
18
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-password.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"user-password.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK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AC;KACrB,CAAC;CACH,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ChB"}
|
|
@@ -14,6 +14,7 @@ const emailPasswordSchema = z.object({
|
|
|
14
14
|
.max(PASSWORD_MAX_LENGTH)
|
|
15
15
|
.transform((value) => value.toLowerCase()),
|
|
16
16
|
password: z.string().min(PASSWORD_MIN_LENGTH).max(PASSWORD_MAX_LENGTH),
|
|
17
|
+
name: z.string().min(1).max(100).optional(),
|
|
17
18
|
});
|
|
18
19
|
/**
|
|
19
20
|
* Rate limiters for authentication operations.
|
|
@@ -34,9 +35,10 @@ const getLoginConsecutiveFailsLimiter = memoizeRateLimiter('login-consecutive-fa
|
|
|
34
35
|
blockDuration: 60 * 15, // Block for 15 minutes after 5 consecutive fails
|
|
35
36
|
});
|
|
36
37
|
export async function createUserWithEmailAndPassword({ input, }) {
|
|
37
|
-
const { email, password } = await emailPasswordSchema
|
|
38
|
+
const { email, password, name } = await emailPasswordSchema
|
|
38
39
|
.parseAsync(input)
|
|
39
40
|
.catch(handleZodRequestValidationError);
|
|
41
|
+
TPL_NAME_REQUIRED_CHECK;
|
|
40
42
|
// check if user with that email already exists
|
|
41
43
|
const existingUser = await prisma.userAccount.findUnique({
|
|
42
44
|
where: {
|
|
@@ -53,6 +55,7 @@ export async function createUserWithEmailAndPassword({ input, }) {
|
|
|
53
55
|
const user = await prisma.user.create({
|
|
54
56
|
data: {
|
|
55
57
|
email,
|
|
58
|
+
name,
|
|
56
59
|
accounts: {
|
|
57
60
|
create: {
|
|
58
61
|
accountId: email,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-password.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAMd,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,eAAe,EACf,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,CAAC;SACL,KAAK,EAAE;SACP,GAAG,CAAC,mBAAmB,CAAC;SACxB,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"user-password.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAMd,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,eAAe,EACf,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OA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AAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC;IAED,4CAA4C;IAC5C,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3D,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;QAC9B,KAAK,EAAE;YACL,oBAAoB,EAAE;gBACpB,SAAS,EAAE,IAAI,CAAC,KAAK;gBACrB,UAAU,EAAE,WAAW;aACxB;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,EAAE,EAAE,MAAM;iBACX;aACF;YACD,SAAS,EAAE,IAAI,CAAC,KAAK;YACrB,UAAU,EAAE,WAAW;YACvB,QAAQ,EAAE,YAAY;SACvB;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,YAAY;SACvB;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -30,6 +30,7 @@ const emailPasswordSchema = z.object({
|
|
|
30
30
|
.max(PASSWORD_MAX_LENGTH)
|
|
31
31
|
.transform((value) => value.toLowerCase()),
|
|
32
32
|
password: z.string().min(PASSWORD_MIN_LENGTH).max(PASSWORD_MAX_LENGTH),
|
|
33
|
+
name: z.string().min(1).max(100).optional(),
|
|
33
34
|
});
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -63,11 +64,13 @@ export async function createUserWithEmailAndPassword({
|
|
|
63
64
|
input: {
|
|
64
65
|
email: string;
|
|
65
66
|
password: string;
|
|
67
|
+
name?: string;
|
|
66
68
|
};
|
|
67
69
|
}): Promise<User> {
|
|
68
|
-
const { email, password } = await emailPasswordSchema
|
|
70
|
+
const { email, password, name } = await emailPasswordSchema
|
|
69
71
|
.parseAsync(input)
|
|
70
72
|
.catch(handleZodRequestValidationError);
|
|
73
|
+
TPL_NAME_REQUIRED_CHECK;
|
|
71
74
|
// check if user with that email already exists
|
|
72
75
|
const existingUser = await prisma.userAccount.findUnique({
|
|
73
76
|
where: {
|
|
@@ -86,6 +89,7 @@ export async function createUserWithEmailAndPassword({
|
|
|
86
89
|
const user = await prisma.user.create({
|
|
87
90
|
data: {
|
|
88
91
|
email,
|
|
92
|
+
name,
|
|
89
93
|
accounts: {
|
|
90
94
|
create: {
|
|
91
95
|
accountId: email,
|
|
@@ -106,6 +110,7 @@ export async function registerUserWithEmailAndPassword({
|
|
|
106
110
|
input: {
|
|
107
111
|
email: string;
|
|
108
112
|
password: string;
|
|
113
|
+
name?: string;
|
|
109
114
|
};
|
|
110
115
|
context: RequestServiceContext;
|
|
111
116
|
}): Promise<{ session: UserSessionPayload; user: User }> {
|
|
@@ -31,15 +31,10 @@ export declare const authHooksGenerator: import("@baseplate-dev/sync").Generator
|
|
|
31
31
|
localAuthCoreAuthHooksRenderers: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-renderers.js").LocalAuthCoreAuthHooksRenderers>;
|
|
32
32
|
}, {
|
|
33
33
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
34
|
+
'*': {};
|
|
34
35
|
graphql: {};
|
|
35
36
|
readFragment: {};
|
|
36
|
-
|
|
37
|
-
isTypeOnly: true;
|
|
38
|
-
};
|
|
39
|
-
ResultOf: {
|
|
40
|
-
isTypeOnly: true;
|
|
41
|
-
};
|
|
42
|
-
VariablesOf: {
|
|
37
|
+
FragmentType: {
|
|
43
38
|
isTypeOnly: true;
|
|
44
39
|
};
|
|
45
40
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-hooks.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-hooks/auth-hooks.generator.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"auth-hooks.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-hooks/auth-hooks.generator.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB7B,CAAC"}
|
|
@@ -33,15 +33,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_GENERATED: {
|
|
|
33
33
|
localAuthCoreAuthHooksRenderers: import("@baseplate-dev/sync").ProviderExport<import("./template-renderers.js").LocalAuthCoreAuthHooksRenderers>;
|
|
34
34
|
}, {
|
|
35
35
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
36
|
+
'*': {};
|
|
36
37
|
graphql: {};
|
|
37
38
|
readFragment: {};
|
|
38
|
-
|
|
39
|
-
isTypeOnly: true;
|
|
40
|
-
};
|
|
41
|
-
ResultOf: {
|
|
42
|
-
isTypeOnly: true;
|
|
43
|
-
};
|
|
44
|
-
VariablesOf: {
|
|
39
|
+
FragmentType: {
|
|
45
40
|
isTypeOnly: true;
|
|
46
41
|
};
|
|
47
42
|
}>>;
|
|
@@ -62,15 +57,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_GENERATED: {
|
|
|
62
57
|
hooksGroup: {
|
|
63
58
|
useLogOut: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
64
59
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
60
|
+
'*': {};
|
|
65
61
|
graphql: {};
|
|
66
62
|
readFragment: {};
|
|
67
|
-
|
|
68
|
-
isTypeOnly: true;
|
|
69
|
-
};
|
|
70
|
-
ResultOf: {
|
|
71
|
-
isTypeOnly: true;
|
|
72
|
-
};
|
|
73
|
-
VariablesOf: {
|
|
63
|
+
FragmentType: {
|
|
74
64
|
isTypeOnly: true;
|
|
75
65
|
};
|
|
76
66
|
}>>;
|
|
@@ -89,15 +79,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_GENERATED: {
|
|
|
89
79
|
}>;
|
|
90
80
|
useSession: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
91
81
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
82
|
+
'*': {};
|
|
92
83
|
graphql: {};
|
|
93
84
|
readFragment: {};
|
|
94
|
-
|
|
95
|
-
isTypeOnly: true;
|
|
96
|
-
};
|
|
97
|
-
ResultOf: {
|
|
98
|
-
isTypeOnly: true;
|
|
99
|
-
};
|
|
100
|
-
VariablesOf: {
|
|
85
|
+
FragmentType: {
|
|
101
86
|
isTypeOnly: true;
|
|
102
87
|
};
|
|
103
88
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oCAAoC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhD,CAAC"}
|
|
@@ -12,15 +12,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_RENDERERS: {
|
|
|
12
12
|
localAuthCoreAuthHooksRenderers: import("@baseplate-dev/sync").ProviderExport<LocalAuthCoreAuthHooksRenderers>;
|
|
13
13
|
}, {
|
|
14
14
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
15
|
+
'*': {};
|
|
15
16
|
graphql: {};
|
|
16
17
|
readFragment: {};
|
|
17
|
-
|
|
18
|
-
isTypeOnly: true;
|
|
19
|
-
};
|
|
20
|
-
ResultOf: {
|
|
21
|
-
isTypeOnly: true;
|
|
22
|
-
};
|
|
23
|
-
VariablesOf: {
|
|
18
|
+
FragmentType: {
|
|
24
19
|
isTypeOnly: true;
|
|
25
20
|
};
|
|
26
21
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYzD,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,oCAAoC,CAAC,UAAU,CACvD,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AAgDD,eAAO,MAAM,oCAAoC
|
|
1
|
+
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYzD,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,oCAAoC,CAAC,UAAU,CACvD,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AAgDD,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;CAGhD,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
export declare const hooksGroup: {
|
|
2
2
|
useLogOut: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
3
3
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
4
|
+
'*': {};
|
|
4
5
|
graphql: {};
|
|
5
6
|
readFragment: {};
|
|
6
|
-
|
|
7
|
-
isTypeOnly: true;
|
|
8
|
-
};
|
|
9
|
-
ResultOf: {
|
|
10
|
-
isTypeOnly: true;
|
|
11
|
-
};
|
|
12
|
-
VariablesOf: {
|
|
7
|
+
FragmentType: {
|
|
13
8
|
isTypeOnly: true;
|
|
14
9
|
};
|
|
15
10
|
}>>;
|
|
@@ -28,15 +23,10 @@ export declare const hooksGroup: {
|
|
|
28
23
|
}>;
|
|
29
24
|
useSession: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
30
25
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
26
|
+
'*': {};
|
|
31
27
|
graphql: {};
|
|
32
28
|
readFragment: {};
|
|
33
|
-
|
|
34
|
-
isTypeOnly: true;
|
|
35
|
-
};
|
|
36
|
-
ResultOf: {
|
|
37
|
-
isTypeOnly: true;
|
|
38
|
-
};
|
|
39
|
-
VariablesOf: {
|
|
29
|
+
FragmentType: {
|
|
40
30
|
isTypeOnly: true;
|
|
41
31
|
};
|
|
42
32
|
}>>;
|
|
@@ -46,15 +36,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_TEMPLATES: {
|
|
|
46
36
|
hooksGroup: {
|
|
47
37
|
useLogOut: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
48
38
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
39
|
+
'*': {};
|
|
49
40
|
graphql: {};
|
|
50
41
|
readFragment: {};
|
|
51
|
-
|
|
52
|
-
isTypeOnly: true;
|
|
53
|
-
};
|
|
54
|
-
ResultOf: {
|
|
55
|
-
isTypeOnly: true;
|
|
56
|
-
};
|
|
57
|
-
VariablesOf: {
|
|
42
|
+
FragmentType: {
|
|
58
43
|
isTypeOnly: true;
|
|
59
44
|
};
|
|
60
45
|
}>>;
|
|
@@ -73,15 +58,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_HOOKS_TEMPLATES: {
|
|
|
73
58
|
}>;
|
|
74
59
|
useSession: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
75
60
|
graphqlImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
61
|
+
'*': {};
|
|
76
62
|
graphql: {};
|
|
77
63
|
readFragment: {};
|
|
78
|
-
|
|
79
|
-
isTypeOnly: true;
|
|
80
|
-
};
|
|
81
|
-
ResultOf: {
|
|
82
|
-
isTypeOnly: true;
|
|
83
|
-
};
|
|
84
|
-
VariablesOf: {
|
|
64
|
+
FragmentType: {
|
|
85
65
|
isTypeOnly: true;
|
|
86
66
|
};
|
|
87
67
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+C,CAAC;AAEvE,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type AuthRole = ReturnType<typeof graphql.scalar<'AuthRole'>>;
|
|
1
|
+
import type { AuthRole } from '%graphqlImports';
|
|
3
2
|
export interface SessionData {
|
|
4
3
|
userId: string | undefined;
|
|
5
4
|
isAuthenticated: boolean;
|
|
@@ -12,4 +11,5 @@ export declare const AuthSessionContext: import("react").Context<SessionData | u
|
|
|
12
11
|
* @returns Current session data with computed isAuthenticated
|
|
13
12
|
*/
|
|
14
13
|
export declare function useSession(): SessionData;
|
|
14
|
+
export type { AuthRole } from '@src/gql/graphql';
|
|
15
15
|
//# sourceMappingURL=use-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,kDAE9B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,WAAW,CAQxC;AAED,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-session.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-session.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQlD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAC7C,SAAS,CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,YAAY,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAEpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { AuthRole } from '%graphqlImports';
|
|
4
4
|
|
|
5
5
|
import { createContext, useContext } from 'react';
|
|
6
6
|
|
|
7
|
-
export type AuthRole = ReturnType<typeof graphql.scalar<'AuthRole'>>;
|
|
8
|
-
|
|
9
7
|
export interface SessionData {
|
|
10
8
|
userId: string | undefined;
|
|
11
9
|
isAuthenticated: boolean;
|
|
@@ -30,3 +28,5 @@ export function useSession(): SessionData {
|
|
|
30
28
|
|
|
31
29
|
return contextValue;
|
|
32
30
|
}
|
|
31
|
+
|
|
32
|
+
export type { AuthRole } from '@src/gql/graphql';
|