@baseplate-dev/plugin-auth 4.0.3 → 5.0.0
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 +35 -0
- package/README.md +3 -3
- package/dist/auth/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +2 -1
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/core/schema/plugin-definition.d.ts +2 -12
- package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/schema.d.ts +2 -12
- package/dist/auth/core/schema/roles/schema.d.ts.map +1 -1
- package/dist/auth/core/schema/roles/schema.js +10 -17
- package/dist/auth/core/schema/roles/schema.js.map +1 -1
- package/dist/auth/plugin.json +1 -1
- 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.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/{auth0/core/components/auth0-definition-editor.js → better-auth/core/components/better-auth-definition-editor.js} +17 -17
- 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.map +1 -0
- package/dist/{auth0 → better-auth}/core/node.js +16 -14
- 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.map +1 -0
- package/dist/{auth0 → better-auth}/core/web.js +2 -2
- package/dist/better-auth/core/web.js.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts → better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts} +20 -26
- 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/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/index.d.ts +41 -26
- 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/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.d.ts +16 -10
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/template-renderers.js +35 -16
- 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/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.d.ts +29 -20
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/generated/typed-templates.js +37 -9
- 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/{auth0/generators/fastify/auth0-module → better-auth/generators/fastify/better-auth-module}/templates/module/schema/user-session.queries.ts +1 -1
- 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/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts} +11 -7
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks/auth0-hooks.generator.js → better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js} +8 -8
- package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/index.d.ts +21 -8
- 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/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/template-paths.js +9 -7
- 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/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.d.ts +2 -2
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/ts-import-providers.js +5 -5
- package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.d.ts +21 -3
- package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/generated/typed-templates.js +7 -3
- 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-session.ts +30 -0
- package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts} +15 -6
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -0
- package/dist/{auth0/generators/react/auth0-pages/auth0-pages.generator.js → better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js} +7 -7
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +1 -0
- package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts +246 -6
- package/dist/{auth0/generators/react/auth0-pages → better-auth/generators/react/better-auth-pages}/generated/index.d.ts.map +1 -1
- 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/{auth0/generators/react/react-auth0 → better-auth/generators/react/better-auth-pages}/generated/template-renderers.d.ts +13 -9
- 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/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts +42 -7
- package/dist/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/index.d.ts.map +1 -1
- 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/{auth0/generators/react/auth0-pages → better-auth/generators/react/react-better-auth}/generated/template-renderers.d.ts +28 -9
- 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/{auth0/generators/react/react-auth0 → better-auth/generators/react/react-better-auth}/generated/typed-templates.d.ts +16 -2
- 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/{auth0/generators/react/react-auth0/react-auth0.generator.d.ts → better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts} +28 -25
- 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/index.d.ts +1 -0
- 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 +11 -11
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +2 -2
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +4 -4
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +3 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +6 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +8 -2
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +14 -3
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.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.js.map +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.js +1 -1
- 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 +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +34 -15
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +58 -15
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +8 -6
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts +2 -4
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +254 -252
- package/dist/local-auth/core/schema/models.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +2 -2
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +11 -11
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
- package/dist/placeholder-auth/core/schema/models.d.ts +2 -4
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/models.js +30 -28
- package/dist/placeholder-auth/core/schema/models.js.map +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-Bg2mzE9K.js → __federation_expose_authCoreCommon-CIVhaGqo.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-Bg2mzE9K.js.map → __federation_expose_authCoreCommon-CIVhaGqo.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-DrOVHmj4.js → __federation_expose_authCoreWeb-N-mh42Bs.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-DrOVHmj4.js.map → __federation_expose_authCoreWeb-N-mh42Bs.js.map} +1 -1
- 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-Bzb0P17-.js → __federation_expose_local-authAdminCommon-DvHe9w29.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-Bzb0P17-.js.map → __federation_expose_local-authAdminCommon-DvHe9w29.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-D_LWcl7j.js → __federation_expose_local-authAdminWeb-CLU9aEy9.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-D_LWcl7j.js.map → __federation_expose_local-authAdminWeb-CLU9aEy9.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-D6OG-Rz6.js → __federation_expose_local-authCoreCommon-DbuvGG7o.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-D6OG-Rz6.js.map → __federation_expose_local-authCoreCommon-DbuvGG7o.js.map} +1 -1
- 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-D7b3GEPP.js → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-D7b3GEPP.js.map → __federation_expose_placeholder-authCoreCommon-BJBCuZvU.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-VZzvid5j.js → __federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js} +61 -53
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-BaV-Ko2C.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-DfNliZHH.js → __federation_fn_import-BLFDCY-V.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-DfNliZHH.js.map → __federation_fn_import-BLFDCY-V.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BqJ1vSYx.js → web-bRU6KpPk.js} +48 -26
- 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-qf98MMJC.js → project-builder-lib-CQKLkNsU.js} +5705 -1957
- 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-DFkMnXmX.js → ui-components-DhyoEUTy.js} +5886 -1191
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DhyoEUTy.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-CApJheqk.js → utils-9w-0yxVZ.js} +64 -45
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-9w-0yxVZ.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-YQslfDyE.js → react-router-CbExBaoL.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-YQslfDyE.js.map → react-router-CbExBaoL.js.map} +1 -1
- package/dist/web/assets/{__federation_shared_zod-B6wbpZ4f.js → __federation_shared_zod-Do7Aa1b5.js} +3431 -2188
- package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-CVuj_mvy.js → get-auth-plugin-definition-BL50g0cJ.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-CVuj_mvy.js.map → get-auth-plugin-definition-BL50g0cJ.js.map} +1 -1
- package/dist/web/assets/{index-B00D4irM.js → index-B_A3cgiy.js} +2 -2
- package/dist/web/assets/{index-B00D4irM.js.map → index-B_A3cgiy.js.map} +1 -1
- package/dist/web/assets/{index.esm-1qBxxnfu.js → index.esm-BraHxHLB.js} +338 -231
- package/dist/web/assets/index.esm-BraHxHLB.js.map +1 -0
- package/dist/web/assets/{isEqual-BQtm2LNT.js → isEqual-tnzoadW8.js} +18 -18
- package/dist/web/assets/isEqual-tnzoadW8.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-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-CcdhC0td.js → plugin-definition-Ckl5hjD1.js} +2 -2
- package/dist/web/assets/{plugin-definition-CcdhC0td.js.map → plugin-definition-Ckl5hjD1.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-B_hlyPlm.js → plugin-definition-D26rR8AB.js} +2 -2
- package/dist/web/assets/{plugin-definition-B_hlyPlm.js.map → plugin-definition-D26rR8AB.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BKCeZ0Ni.js → plugin-definition-DJzXScRp.js} +12 -19
- package/dist/web/assets/plugin-definition-DJzXScRp.js.map +1 -0
- package/dist/web/assets/{react-Df9ccuow.js → react-CL9M_wyN.js} +2 -2
- package/dist/web/assets/{react-Df9ccuow.js.map → react-CL9M_wyN.js.map} +1 -1
- package/dist/web/assets/{registries-19UehlAo.js → registries-Tz_dluz3.js} +51 -13
- package/dist/web/assets/registries-Tz_dluz3.js.map +1 -0
- package/dist/web/assets/remoteEntry.js +14 -14
- package/dist/web/assets/{styles-CbPVroCT.js → styles-tkrWV-ZE.js} +4 -4
- package/dist/web/assets/{styles-CbPVroCT.js.map → styles-tkrWV-ZE.js.map} +1 -1
- package/package.json +17 -17
- package/dist/auth0/constants/model-names.d.ts +0 -4
- package/dist/auth0/constants/model-names.d.ts.map +0 -1
- package/dist/auth0/constants/model-names.js +0 -4
- package/dist/auth0/constants/model-names.js.map +0 -1
- 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.map +0 -1
- package/dist/auth0/core/common.js +0 -19
- package/dist/auth0/core/common.js.map +0 -1
- package/dist/auth0/core/components/auth0-definition-editor.d.ts +0 -5
- package/dist/auth0/core/components/auth0-definition-editor.d.ts.map +0 -1
- package/dist/auth0/core/components/auth0-definition-editor.js.map +0 -1
- package/dist/auth0/core/node.d.ts.map +0 -1
- 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 -19
- package/dist/auth0/core/schema/migrations.js.map +0 -1
- package/dist/auth0/core/schema/models.d.ts +0 -5
- package/dist/auth0/core/schema/models.d.ts.map +0 -1
- package/dist/auth0/core/schema/models.js +0 -40
- package/dist/auth0/core/schema/models.js.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +0 -5
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +0 -1
- package/dist/auth0/core/schema/plugin-definition.js +0 -4
- package/dist/auth0/core/schema/plugin-definition.js.map +0 -1
- package/dist/auth0/core/web.d.ts.map +0 -1
- package/dist/auth0/core/web.js.map +0 -1
- 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 -114
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js +0 -11
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +0 -14
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +0 -24
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +0 -10
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +0 -23
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts +0 -2
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/index.js +0 -2
- package/dist/auth0/generators/fastify/auth0-module/index.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/templates/module/services/management.ts +0 -22
- package/dist/auth0/generators/fastify/auth0-module/templates/module/services/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/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/index.js +0 -2
- package/dist/auth0/generators/react/auth0-apollo/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +0 -11
- 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.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js +0 -11
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +0 -14
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +0 -23
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +0 -38
- package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/index.js +0 -2
- package/dist/auth0/generators/react/auth0-hooks/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-log-out.ts +0 -14
- package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-session.ts +0 -36
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/index.js +0 -9
- package/dist/auth0/generators/react/auth0-pages/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts +0 -12
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js +0 -20
- package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js +0 -37
- package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +0 -433
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js +0 -18
- package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/index.d.ts +0 -2
- package/dist/auth0/generators/react/auth0-pages/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/index.js +0 -2
- package/dist/auth0/generators/react/auth0-pages/index.js.map +0 -1
- package/dist/auth0/generators/react/auth0-pages/templates/routes/login.tsx +0 -31
- package/dist/auth0/generators/react/index.d.ts +0 -5
- package/dist/auth0/generators/react/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/index.js +0 -5
- package/dist/auth0/generators/react/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/index.js +0 -9
- package/dist/auth0/generators/react/react-auth0/generated/index.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts +0 -12
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js +0 -22
- package/dist/auth0/generators/react/react-auth0/generated/template-paths.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js +0 -39
- package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js +0 -17
- package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/index.d.ts +0 -2
- package/dist/auth0/generators/react/react-auth0/index.d.ts.map +0 -1
- package/dist/auth0/generators/react/react-auth0/index.js +0 -2
- package/dist/auth0/generators/react/react-auth0/index.js.map +0 -1
- 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 -107
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +0 -1
- package/dist/auth0/generators/react/react-auth0/templates/src/app/auth-loaded-gate.tsx +0 -78
- package/dist/auth0/plugin.json +0 -9
- package/dist/auth0/static/icon.svg +0 -7
- package/dist/web/assets/__federation_expose_auth0CoreCommon-e_GtBIIm.js +0 -40
- package/dist/web/assets/__federation_expose_auth0CoreCommon-e_GtBIIm.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-CTfPylMw.js +0 -158
- package/dist/web/assets/__federation_expose_auth0CoreWeb-CTfPylMw.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js +0 -424
- package/dist/web/assets/__federation_expose_local-authCoreWeb-CaR8fx1f.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-VZzvid5j.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BqJ1vSYx.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-qf98MMJC.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-DFkMnXmX.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CApJheqk.js.map +0 -1
- package/dist/web/assets/__federation_shared_zod-B6wbpZ4f.js.map +0 -1
- package/dist/web/assets/index.esm-1qBxxnfu.js.map +0 -1
- package/dist/web/assets/isEqual-BQtm2LNT.js.map +0 -1
- package/dist/web/assets/model-merger-59HLmy_J.js +0 -1705
- package/dist/web/assets/model-merger-59HLmy_J.js.map +0 -1
- package/dist/web/assets/plugin-definition-BKCeZ0Ni.js.map +0 -1
- package/dist/web/assets/plugin-definition-Bkx-a_wA.js +0 -16
- package/dist/web/assets/plugin-definition-Bkx-a_wA.js.map +0 -1
- package/dist/web/assets/registries-19UehlAo.js.map +0 -1
- package/dist/web/assets/sortBy-BPH_zRB8.js +0 -34
- package/dist/web/assets/sortBy-BPH_zRB8.js.map +0 -1
- /package/dist/{auth0 → better-auth}/core/common.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/core/node.d.ts +0 -0
- /package/dist/{auth0 → better-auth}/core/web.d.ts +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/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/templates/src/hooks/use-required-user-id.ts +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { appModuleProvider } from '@baseplate-dev/fastify-generators';
|
|
2
|
-
import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
|
|
3
|
-
const auth0Auth0ModulePaths = createProviderType('auth0-auth0-module-paths');
|
|
4
|
-
const auth0Auth0ModulePathsTask = createGeneratorTask({
|
|
5
|
-
dependencies: { appModule: appModuleProvider },
|
|
6
|
-
exports: { auth0Auth0ModulePaths: auth0Auth0ModulePaths.export() },
|
|
7
|
-
run({ appModule }) {
|
|
8
|
-
const moduleRoot = appModule.getModuleFolder();
|
|
9
|
-
return {
|
|
10
|
-
providers: {
|
|
11
|
-
auth0Auth0ModulePaths: {
|
|
12
|
-
management: `${moduleRoot}/services/management.ts`,
|
|
13
|
-
userSessionQueries: `${moduleRoot}/schema/user-session.queries.ts`,
|
|
14
|
-
userSessionService: `${moduleRoot}/services/user-session.service.ts`,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export const AUTH0_AUTH0_MODULE_PATHS = {
|
|
21
|
-
provider: auth0Auth0ModulePaths,
|
|
22
|
-
task: auth0Auth0ModulePathsTask,
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=template-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/template-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAQ9E,MAAM,qBAAqB,GAAG,kBAAkB,CAC9C,0BAA0B,CAC3B,CAAC;AAEF,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;IACpD,YAAY,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE;IAC9C,OAAO,EAAE,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,MAAM,EAAE,EAAE;IAClE,GAAG,CAAC,EAAE,SAAS,EAAE;QACf,MAAM,UAAU,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;QAE/C,OAAO;YACL,SAAS,EAAE;gBACT,qBAAqB,EAAE;oBACrB,UAAU,EAAE,GAAG,UAAU,yBAAyB;oBAClD,kBAAkB,EAAE,GAAG,UAAU,iCAAiC;oBAClE,kBAAkB,EAAE,GAAG,UAAU,mCAAmC;iBACrE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ,EAAE,qBAAqB;IAC/B,IAAI,EAAE,yBAAyB;CAChC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAczD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,4BAA4B,CAAC,UAAU,CAC/C,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;IACF,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,4BAA4B,CAAC,kBAAkB,CACvD,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;IACF,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,4BAA4B,CAAC,kBAAkB,CACvD,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AAyED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/template-renderers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAmCpE,MAAM,yBAAyB,GAAG,kBAAkB,CAClD,8BAA8B,CAC/B,CAAC;AAEF,MAAM,6BAA6B,GAAG,mBAAmB,CAAC;IACxD,YAAY,EAAE;QACZ,kBAAkB,EAAE,0BAA0B;QAC9C,gBAAgB,EAAE,wBAAwB;QAC1C,oBAAoB,EAAE,4BAA4B;QAClD,KAAK,EAAE,wBAAwB,CAAC,QAAQ;QACxC,aAAa,EAAE,qBAAqB;QACpC,aAAa,EAAE,qBAAqB;QACpC,cAAc,EAAE,sBAAsB;QACtC,uBAAuB,EAAE,+BAA+B;KACzD;IACD,OAAO,EAAE,EAAE,yBAAyB,EAAE,yBAAyB,CAAC,MAAM,EAAE,EAAE;IAC1E,GAAG,CAAC,EACF,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,uBAAuB,GACxB;QACC,OAAO;YACL,SAAS,EAAE;gBACT,yBAAyB,EAAE;oBACzB,UAAU,EAAE;wBACV,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,kBAAkB,CAAC;4BAChC,QAAQ,EAAE,4BAA4B,CAAC,UAAU;4BACjD,WAAW,EAAE,KAAK,CAAC,UAAU;4BAC7B,kBAAkB,EAAE;gCAClB,oBAAoB;6BACrB;4BACD,GAAG,OAAO;yBACX,CAAC;qBACL;oBACD,kBAAkB,EAAE;wBAClB,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,kBAAkB,CAAC;4BAChC,QAAQ,EAAE,4BAA4B,CAAC,kBAAkB;4BACzD,WAAW,EAAE,KAAK,CAAC,kBAAkB;4BACrC,kBAAkB,EAAE;gCAClB,aAAa;gCACb,aAAa;6BACd;4BACD,GAAG,OAAO;yBACX,CAAC;qBACL;oBACD,kBAAkB,EAAE;wBAClB,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,kBAAkB,CAAC;4BAChC,QAAQ,EAAE,4BAA4B,CAAC,kBAAkB;4BACzD,WAAW,EAAE,KAAK,CAAC,kBAAkB;4BACrC,kBAAkB,EAAE;gCAClB,kBAAkB;gCAClB,gBAAgB;gCAChB,uBAAuB;6BACxB;4BACD,GAAG,OAAO;yBACX,CAAC;qBACL;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,QAAQ,EAAE,yBAAyB;IACnC,IAAI,EAAE,6BAA6B;CACpC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const AUTH0_AUTH0_MODULE_IMPORTS: {
|
|
2
|
-
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
3
|
-
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
4
|
-
userSessionService: {};
|
|
5
|
-
}>>;
|
|
6
|
-
}, {
|
|
7
|
-
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").Auth0Auth0ModulePaths>;
|
|
8
|
-
}, undefined>;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=ts-import-providers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,0BAA0B;;;;;;;;CAEtC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createTsImportMap, packageScope, } from '@baseplate-dev/core-generators';
|
|
2
|
-
import { userSessionServiceImportsProvider, userSessionServiceImportsSchema, } from '@baseplate-dev/fastify-generators';
|
|
3
|
-
import { createGeneratorTask } from '@baseplate-dev/sync';
|
|
4
|
-
import { AUTH0_AUTH0_MODULE_PATHS } from './template-paths.js';
|
|
5
|
-
const auth0Auth0ModuleImportsTask = createGeneratorTask({
|
|
6
|
-
dependencies: {
|
|
7
|
-
paths: AUTH0_AUTH0_MODULE_PATHS.provider,
|
|
8
|
-
},
|
|
9
|
-
exports: {
|
|
10
|
-
userSessionServiceImports: userSessionServiceImportsProvider.export(packageScope),
|
|
11
|
-
},
|
|
12
|
-
run({ paths }) {
|
|
13
|
-
return {
|
|
14
|
-
providers: {
|
|
15
|
-
userSessionServiceImports: createTsImportMap(userSessionServiceImportsSchema, { userSessionService: paths.userSessionService }),
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export const AUTH0_AUTH0_MODULE_IMPORTS = {
|
|
21
|
-
task: auth0Auth0ModuleImportsTask,
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ts-import-providers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;IACtD,YAAY,EAAE;QACZ,KAAK,EAAE,wBAAwB,CAAC,QAAQ;KACzC;IACD,OAAO,EAAE;QACP,yBAAyB,EACvB,iCAAiC,CAAC,MAAM,CAAC,YAAY,CAAC;KACzD;IACD,GAAG,CAAC,EAAE,KAAK,EAAE;QACX,OAAO;YACL,SAAS,EAAE;gBACT,yBAAyB,EAAE,iBAAiB,CAC1C,+BAA+B,EAC/B,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CACjD;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,2BAA2B;CAClC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/typed-templates.ts"],"names":[],"mappings":"AA0DA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/fastify/auth0-module/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,GAAG,oBAAoB,CAAC;IACtC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,kBAAkB,EAAE,EAAE,oBAAoB,EAAE,4BAA4B,EAAE;IAC1E,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,4CAA4C,CAC7C;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,kBAAkB,EAAE;QAClB,aAAa,EAAE,qBAAqB;QACpC,aAAa,EAAE,qBAAqB;KACrC;IACD,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,oDAAoD,CACrD;KACF;IACD,SAAS,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,kBAAkB,EAAE;QAClB,kBAAkB,EAAE,0BAA0B;QAC9C,gBAAgB,EAAE,wBAAwB;QAC1C,uBAAuB,EAAE,+BAA+B;KACzD;IACD,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;IAC1C,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,sDAAsD,CACvD;KACF;IACD,SAAS,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,kBAAkB;IAClB,kBAAkB;CACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/fastify/auth0-module/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/fastify/auth0-module/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import { config } from '%configServiceImports';
|
|
4
|
-
import { ManagementClient } from 'auth0';
|
|
5
|
-
|
|
6
|
-
let cachedClient: ManagementClient | null = null;
|
|
7
|
-
|
|
8
|
-
export function getAuth0ManagementClient(): ManagementClient {
|
|
9
|
-
if (cachedClient) {
|
|
10
|
-
return cachedClient;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const client = new ManagementClient({
|
|
14
|
-
domain: config.AUTH0_TENANT_DOMAIN,
|
|
15
|
-
clientId: config.AUTH0_CLIENT_ID,
|
|
16
|
-
clientSecret: config.AUTH0_CLIENT_SECRET,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
cachedClient = client;
|
|
20
|
-
|
|
21
|
-
return client;
|
|
22
|
-
}
|
package/dist/auth0/generators/fastify/auth0-module/templates/module/services/user-session.service.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import type { AuthUserSessionInfo } from '%authContextImports';
|
|
4
|
-
import type { AuthRole } from '%authRolesImports';
|
|
5
|
-
import type { UserSessionService } from '%userSessionTypesImports';
|
|
6
|
-
import type { FastifyRequest } from 'fastify';
|
|
7
|
-
|
|
8
|
-
import { DEFAULT_USER_ROLES } from '%authRolesImports';
|
|
9
|
-
|
|
10
|
-
const USER_ID_CLAIM = 'https://app.com/user_id';
|
|
11
|
-
const EMAIL_CLAIM = 'https://app.com/email';
|
|
12
|
-
const EMAIL_VERIFIED_CLAIM = 'https://app.com/email_verified';
|
|
13
|
-
const ROLES_CLAIM = 'https://app.com/roles';
|
|
14
|
-
|
|
15
|
-
interface Auth0Jwt {
|
|
16
|
-
[USER_ID_CLAIM]?: string;
|
|
17
|
-
[EMAIL_CLAIM]?: string;
|
|
18
|
-
[EMAIL_VERIFIED_CLAIM]?: boolean;
|
|
19
|
-
[ROLES_CLAIM]?: string[];
|
|
20
|
-
sub: string;
|
|
21
|
-
email: string;
|
|
22
|
-
exp: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export class Auth0UserSessionService implements UserSessionService {
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves the user session information from the request.
|
|
28
|
-
*
|
|
29
|
-
* @param req - The Fastify request object containing the cookies.
|
|
30
|
-
* @param reply - The Fastify reply object used to set or clear cookies.
|
|
31
|
-
* @param currentDate - The current date used for session validation. Defaults to the current date and time.
|
|
32
|
-
* @returns A promise that resolves to the authenticated user session information or null if the session is invalid.
|
|
33
|
-
* @throws {InvalidSessionError} If the session is invalid or expired.
|
|
34
|
-
*/
|
|
35
|
-
async getSessionInfoFromRequest(
|
|
36
|
-
req: FastifyRequest,
|
|
37
|
-
): Promise<AuthUserSessionInfo | undefined> {
|
|
38
|
-
if (!req.headers.authorization) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const verifiedJwt = await req.jwtVerify<Auth0Jwt>();
|
|
43
|
-
const userId = verifiedJwt[USER_ID_CLAIM];
|
|
44
|
-
const roles = verifiedJwt[ROLES_CLAIM] ?? [];
|
|
45
|
-
const email = verifiedJwt[EMAIL_CLAIM];
|
|
46
|
-
|
|
47
|
-
if (!userId) {
|
|
48
|
-
throw new Error(`Missing user id in JWT`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const user = await TPL_USER_MODEL.findUnique({ where: { id: userId } });
|
|
52
|
-
|
|
53
|
-
// create user if one does not exist already
|
|
54
|
-
if (!user) {
|
|
55
|
-
if (!email) {
|
|
56
|
-
throw new Error(`Missing email claim in JWT`);
|
|
57
|
-
}
|
|
58
|
-
// Use createMany to avoid race-conditions with creating the user
|
|
59
|
-
await TPL_USER_MODEL.createMany({
|
|
60
|
-
data: [
|
|
61
|
-
{
|
|
62
|
-
id: userId,
|
|
63
|
-
auth0Id: verifiedJwt.sub,
|
|
64
|
-
email,
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
skipDuplicates: true,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return {
|
|
72
|
-
id: verifiedJwt.sub,
|
|
73
|
-
type: 'user',
|
|
74
|
-
userId,
|
|
75
|
-
roles: [...DEFAULT_USER_ROLES, ...roles] as AuthRole[],
|
|
76
|
-
expiresAt:
|
|
77
|
-
typeof verifiedJwt.exp === 'number'
|
|
78
|
-
? new Date(verifiedJwt.exp * 1000)
|
|
79
|
-
: undefined,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Retrieves the user session information from the authentication token
|
|
85
|
-
*
|
|
86
|
-
* @param req The request object
|
|
87
|
-
* @returns The session info or undefined if no session is found
|
|
88
|
-
*/
|
|
89
|
-
async getSessionInfoFromToken(
|
|
90
|
-
req: FastifyRequest,
|
|
91
|
-
token?: string | null,
|
|
92
|
-
): Promise<AuthUserSessionInfo | undefined> {
|
|
93
|
-
// We have to manually add the header to the request since we can't
|
|
94
|
-
// use server.jwt.verify due to an error
|
|
95
|
-
req.headers.authorization = token ?? undefined;
|
|
96
|
-
|
|
97
|
-
return this.getSessionInfoFromRequest(req);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const userSessionService = new Auth0UserSessionService();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth0/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth0/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth0/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth0/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const auth0ApolloGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<Record<string, never>, {
|
|
2
|
-
main: import("@baseplate-dev/sync").GeneratorTask<any, {
|
|
3
|
-
reactApolloConfig: import("@baseplate-dev/sync").ProviderType<Omit<import("@baseplate-dev/utils").FieldMap<{
|
|
4
|
-
createApolloClientArguments: import("@baseplate-dev/utils").NamedArrayFieldContainer<import("@baseplate-dev/react-generators").ApolloCreateArgument>;
|
|
5
|
-
apolloLinks: import("@baseplate-dev/utils").NamedArrayFieldContainer<import("@baseplate-dev/react-generators").ApolloLink>;
|
|
6
|
-
websocketOptions: import("@baseplate-dev/utils").MapContainer<string, string | import("@baseplate-dev/core-generators").TsCodeFragment>;
|
|
7
|
-
}>, "getValues">>;
|
|
8
|
-
}, any>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=auth0-apollo.generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-apollo.generator.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-apollo/auth0-apollo.generator.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;EA4C/B,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { tsCodeFragment, TsCodeUtils, tsImportBuilder, } from '@baseplate-dev/core-generators';
|
|
2
|
-
import { reactApolloConfigProvider } from '@baseplate-dev/react-generators';
|
|
3
|
-
import { createGenerator, createGeneratorTask } from '@baseplate-dev/sync';
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
const descriptorSchema = z.object({});
|
|
6
|
-
export const auth0ApolloGenerator = createGenerator({
|
|
7
|
-
name: 'auth0/auth0-apollo',
|
|
8
|
-
generatorFileUrl: import.meta.url,
|
|
9
|
-
descriptorSchema,
|
|
10
|
-
buildTasks: () => ({
|
|
11
|
-
main: createGeneratorTask({
|
|
12
|
-
dependencies: {
|
|
13
|
-
reactApolloConfig: reactApolloConfigProvider,
|
|
14
|
-
},
|
|
15
|
-
run({ reactApolloConfig }) {
|
|
16
|
-
reactApolloConfig.createApolloClientArguments.add({
|
|
17
|
-
name: 'getAccessToken',
|
|
18
|
-
type: '() => Promise<string | undefined>',
|
|
19
|
-
reactRenderBody: tsCodeFragment('const { getAccessTokenSilently: getAccessToken } = useAuth0();', tsImportBuilder(['useAuth0']).from('@auth0/auth0-react')),
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
providers: {
|
|
23
|
-
auth0Apollo: {},
|
|
24
|
-
},
|
|
25
|
-
build: async (builder) => {
|
|
26
|
-
const linkTemplate = await builder.readTemplate('auth-link.ts');
|
|
27
|
-
const authLink = TsCodeUtils.extractTemplateSnippet(linkTemplate, 'AUTH_LINK');
|
|
28
|
-
reactApolloConfig.apolloLinks.add({
|
|
29
|
-
name: 'authLink',
|
|
30
|
-
bodyFragment: tsCodeFragment(authLink, [
|
|
31
|
-
tsImportBuilder(['SetContextLink']).from('@apollo/client/link/context'),
|
|
32
|
-
]),
|
|
33
|
-
priority: 'auth',
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
}),
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=auth0-apollo.generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-apollo.generator.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-apollo/auth0-apollo.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,eAAe,GAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IAClD,IAAI,EAAE,oBAAoB;IAC1B,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,iBAAiB,EAAE,yBAAyB;aAC7C;YACD,GAAG,CAAC,EAAE,iBAAiB,EAAE;gBACvB,iBAAiB,CAAC,2BAA2B,CAAC,GAAG,CAAC;oBAChD,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,mCAAmC;oBACzC,eAAe,EAAE,cAAc,CAC7B,gEAAgE,EAChE,eAAe,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CACzD;iBACF,CAAC,CAAC;gBAEH,OAAO;oBACL,SAAS,EAAE;wBACT,WAAW,EAAE,EAAE;qBAChB;oBACD,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;wBAChE,MAAM,QAAQ,GAAG,WAAW,CAAC,sBAAsB,CACjD,YAAY,EACZ,WAAW,CACZ,CAAC;wBAEF,iBAAiB,CAAC,WAAW,CAAC,GAAG,CAAC;4BAChC,IAAI,EAAE,UAAU;4BAChB,YAAY,EAAE,cAAc,CAAC,QAAQ,EAAE;gCACrC,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CACtC,6BAA6B,CAC9B;6BACF,CAAC;4BACF,QAAQ,EAAE,MAAM;yBACjB,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-apollo/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-apollo/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
// AUTH_LINK:START
|
|
4
|
-
const authLink = new SetContextLink(async () => {
|
|
5
|
-
const accessToken = await getAccessToken();
|
|
6
|
-
if (!accessToken) {
|
|
7
|
-
return {};
|
|
8
|
-
}
|
|
9
|
-
return { headers: { authorization: `Bearer ${accessToken}` } };
|
|
10
|
-
});
|
|
11
|
-
// AUTH_LINK:END
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-hooks.generator.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/auth0-hooks.generator.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-hooks.generator.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/auth0-hooks.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,mBAAmB;IACzB,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9B,KAAK,EAAE,2BAA2B,CAAC,KAAK,CAAC,IAAI;QAC7C,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,IAAI;QACjD,SAAS,EAAE,2BAA2B,CAAC,SAAS,CAAC,IAAI;QACrD,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,SAAS,EAAE,2BAA2B,CAAC,SAAS,CAAC,QAAQ;aAC1D;YACD,GAAG,CAAC,EAAE,SAAS,EAAE;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;4BAC1B,SAAS,EAAE;gCACT,UAAU,EAAE;oCACV,cAAc,EAAE,WAAW,CAAC,8BAA8B,CACxD,CAAC,GAAG,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACpD;iCACF;6BACF;yBACF,CAAC,CACH,CAAC;oBACJ,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKvC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AUTH0_AUTH0_HOOKS_PATHS } from './template-paths.js';
|
|
2
|
-
import { AUTH0_AUTH0_HOOKS_RENDERERS } from './template-renderers.js';
|
|
3
|
-
import { AUTH0_AUTH0_HOOKS_IMPORTS } from './ts-import-providers.js';
|
|
4
|
-
import { AUTH0_AUTH0_HOOKS_TEMPLATES } from './typed-templates.js';
|
|
5
|
-
export const AUTH0_AUTH0_HOOKS_GENERATED = {
|
|
6
|
-
imports: AUTH0_AUTH0_HOOKS_IMPORTS,
|
|
7
|
-
paths: AUTH0_AUTH0_HOOKS_PATHS,
|
|
8
|
-
renderers: AUTH0_AUTH0_HOOKS_RENDERERS,
|
|
9
|
-
templates: AUTH0_AUTH0_HOOKS_TEMPLATES,
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,yBAAyB;IAClC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,2BAA2B;CACvC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Auth0Auth0HooksPaths {
|
|
2
|
-
useLogOut: string;
|
|
3
|
-
useRequiredUserId: string;
|
|
4
|
-
useSession: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const AUTH0_AUTH0_HOOKS_PATHS: {
|
|
7
|
-
provider: import("@baseplate-dev/sync").ProviderType<Auth0Auth0HooksPaths>;
|
|
8
|
-
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
9
|
-
auth0Auth0HooksPaths: import("@baseplate-dev/sync").ProviderExport<Auth0Auth0HooksPaths>;
|
|
10
|
-
}, {
|
|
11
|
-
packageInfo: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").PackageInfoProvider>;
|
|
12
|
-
}, undefined>;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=template-paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAwBD,eAAO,MAAM,uBAAuB;;;;;;;CAGnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/template-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAQ9E,MAAM,oBAAoB,GAAG,kBAAkB,CAC7C,yBAAyB,CAC1B,CAAC;AAEF,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;IACnD,YAAY,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE;IAClD,OAAO,EAAE,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,EAAE,EAAE;IAChE,GAAG,CAAC,EAAE,WAAW,EAAE;QACjB,MAAM,OAAO,GAAG,WAAW,CAAC,iBAAiB,EAAE,CAAC;QAEhD,OAAO;YACL,SAAS,EAAE;gBACT,oBAAoB,EAAE;oBACpB,SAAS,EAAE,GAAG,OAAO,uBAAuB;oBAC5C,iBAAiB,EAAE,GAAG,OAAO,gCAAgC;oBAC7D,UAAU,EAAE,GAAG,OAAO,uBAAuB;iBAC9C;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ,EAAE,oBAAoB;IAC9B,IAAI,EAAE,wBAAwB;CAC/B,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { RenderTsTemplateGroupActionInput } from '@baseplate-dev/core-generators';
|
|
2
|
-
import type { BuilderAction } from '@baseplate-dev/sync';
|
|
3
|
-
import { AUTH0_AUTH0_HOOKS_TEMPLATES } from './typed-templates.js';
|
|
4
|
-
export interface Auth0Auth0HooksRenderers {
|
|
5
|
-
hooksGroup: {
|
|
6
|
-
render: (options: Omit<RenderTsTemplateGroupActionInput<typeof AUTH0_AUTH0_HOOKS_TEMPLATES.hooksGroup>, 'importMapProviders' | 'group' | 'paths' | 'generatorPaths'>) => BuilderAction;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export declare const AUTH0_AUTH0_HOOKS_RENDERERS: {
|
|
10
|
-
provider: import("@baseplate-dev/sync").ProviderType<Auth0Auth0HooksRenderers>;
|
|
11
|
-
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
12
|
-
auth0Auth0HooksRenderers: import("@baseplate-dev/sync").ProviderExport<Auth0Auth0HooksRenderers>;
|
|
13
|
-
}, {
|
|
14
|
-
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").Auth0Auth0HooksPaths>;
|
|
15
|
-
reactErrorImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
16
|
-
formatError: {};
|
|
17
|
-
logAndFormatError: {};
|
|
18
|
-
logError: {};
|
|
19
|
-
}>>;
|
|
20
|
-
typescriptFile: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").TypescriptFileProvider>;
|
|
21
|
-
}, undefined>;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=template-renderers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-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;AAOzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,2BAA2B,CAAC,UAAU,CAC9C,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AAmCD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;CAGvC,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { typescriptFileProvider } from '@baseplate-dev/core-generators';
|
|
2
|
-
import { reactErrorImportsProvider } from '@baseplate-dev/react-generators';
|
|
3
|
-
import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
|
|
4
|
-
import { AUTH0_AUTH0_HOOKS_PATHS } from './template-paths.js';
|
|
5
|
-
import { AUTH0_AUTH0_HOOKS_TEMPLATES } from './typed-templates.js';
|
|
6
|
-
const auth0Auth0HooksRenderers = createProviderType('auth0-auth0-hooks-renderers');
|
|
7
|
-
const auth0Auth0HooksRenderersTask = createGeneratorTask({
|
|
8
|
-
dependencies: {
|
|
9
|
-
paths: AUTH0_AUTH0_HOOKS_PATHS.provider,
|
|
10
|
-
reactErrorImports: reactErrorImportsProvider,
|
|
11
|
-
typescriptFile: typescriptFileProvider,
|
|
12
|
-
},
|
|
13
|
-
exports: { auth0Auth0HooksRenderers: auth0Auth0HooksRenderers.export() },
|
|
14
|
-
run({ paths, reactErrorImports, typescriptFile }) {
|
|
15
|
-
return {
|
|
16
|
-
providers: {
|
|
17
|
-
auth0Auth0HooksRenderers: {
|
|
18
|
-
hooksGroup: {
|
|
19
|
-
render: (options) => typescriptFile.renderTemplateGroup({
|
|
20
|
-
group: AUTH0_AUTH0_HOOKS_TEMPLATES.hooksGroup,
|
|
21
|
-
paths,
|
|
22
|
-
importMapProviders: {
|
|
23
|
-
reactErrorImports,
|
|
24
|
-
},
|
|
25
|
-
generatorPaths: paths,
|
|
26
|
-
...options,
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
export const AUTH0_AUTH0_HOOKS_RENDERERS = {
|
|
35
|
-
provider: auth0Auth0HooksRenderers,
|
|
36
|
-
task: auth0Auth0HooksRenderersTask,
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=template-renderers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/template-renderers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAenE,MAAM,wBAAwB,GAAG,kBAAkB,CACjD,6BAA6B,CAC9B,CAAC;AAEF,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;IACvD,YAAY,EAAE;QACZ,KAAK,EAAE,uBAAuB,CAAC,QAAQ;QACvC,iBAAiB,EAAE,yBAAyB;QAC5C,cAAc,EAAE,sBAAsB;KACvC;IACD,OAAO,EAAE,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,MAAM,EAAE,EAAE;IACxE,GAAG,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE;QAC9C,OAAO;YACL,SAAS,EAAE;gBACT,wBAAwB,EAAE;oBACxB,UAAU,EAAE;wBACV,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,mBAAmB,CAAC;4BACjC,KAAK,EAAE,2BAA2B,CAAC,UAAU;4BAC7C,KAAK;4BACL,kBAAkB,EAAE;gCAClB,iBAAiB;6BAClB;4BACD,cAAc,EAAE,KAAK;4BACrB,GAAG,OAAO;yBACX,CAAC;qBACL;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,QAAQ,EAAE,wBAAwB;IAClC,IAAI,EAAE,4BAA4B;CACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/ts-import-providers.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAErC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;IACrD,YAAY,EAAE;QACZ,KAAK,EAAE,uBAAuB,CAAC,QAAQ;KACxC;IACD,OAAO,EAAE,EAAE,gBAAgB,EAAE,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;IAC5E,GAAG,CAAC,EAAE,KAAK,EAAE;QACX,OAAO;YACL,SAAS,EAAE;gBACT,gBAAgB,EAAE,iBAAiB,CAAC,sBAAsB,EAAE;oBAC1D,QAAQ,EAAE,KAAK,CAAC,UAAU;oBAC1B,WAAW,EAAE,KAAK,CAAC,UAAU;oBAC7B,SAAS,EAAE,KAAK,CAAC,SAAS;oBAC1B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;oBAC1C,UAAU,EAAE,KAAK,CAAC,UAAU;iBAC7B,CAAC;aACH;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,0BAA0B;CACjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAA+C,CAAC;AAEvE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;CAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-hooks/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,SAAS,GAAG,oBAAoB,CAAC;IACrC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE,iBAAiB,EAAE,yBAAyB,EAAE;IACpE,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACjC,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uCAAuC,CACxC;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE;IACzC,4BAA4B,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IAChD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,gDAAgD,CACjD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,oBAAoB,CAAC;IACtC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;QAC9B,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;QACjC,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,uCAAuC,CACxC;KACF;IACD,SAAS,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AAEvE,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import { logError } from '%reactErrorImports';
|
|
4
|
-
import { useAuth0 } from '@auth0/auth0-react';
|
|
5
|
-
|
|
6
|
-
export function useLogOut(): () => void {
|
|
7
|
-
const { logout } = useAuth0();
|
|
8
|
-
|
|
9
|
-
return () => {
|
|
10
|
-
logout({ logoutParams: { returnTo: globalThis.location.origin } }).catch(
|
|
11
|
-
(err: unknown) => logError(err),
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
import { useAuth0 } from '@auth0/auth0-react';
|
|
4
|
-
import { useMemo } from 'react';
|
|
5
|
-
|
|
6
|
-
const AUTH_ROLES = TPL_AUTH_ROLES as const;
|
|
7
|
-
export type AuthRole = (typeof AUTH_ROLES)[number];
|
|
8
|
-
|
|
9
|
-
export interface SessionData {
|
|
10
|
-
userId: string | undefined;
|
|
11
|
-
isAuthenticated: boolean;
|
|
12
|
-
roles: AuthRole[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const USER_ID_CLAIM = 'https://app.com/user_id';
|
|
16
|
-
const ROLES_CLAIM = 'https://app.com/roles';
|
|
17
|
-
|
|
18
|
-
export function useSession(): SessionData {
|
|
19
|
-
const { user, isAuthenticated } = useAuth0();
|
|
20
|
-
|
|
21
|
-
const rolesClaim = user?.[ROLES_CLAIM] as string[] | undefined;
|
|
22
|
-
|
|
23
|
-
const sessionData: SessionData = useMemo(
|
|
24
|
-
() => ({
|
|
25
|
-
userId: user?.[USER_ID_CLAIM] as string | undefined,
|
|
26
|
-
isAuthenticated,
|
|
27
|
-
roles: Array.isArray(rolesClaim)
|
|
28
|
-
? rolesClaim.filter((role): role is AuthRole =>
|
|
29
|
-
AUTH_ROLES.includes(role as AuthRole),
|
|
30
|
-
)
|
|
31
|
-
: ['public'],
|
|
32
|
-
}),
|
|
33
|
-
[user, isAuthenticated, rolesClaim],
|
|
34
|
-
);
|
|
35
|
-
return sessionData;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-pages.generator.d.ts","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-pages/auth0-pages.generator.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-pages.generator.js","sourceRoot":"","sources":["../../../../../src/auth0/generators/react/auth0-pages/auth0-pages.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,mBAAmB;IACzB,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,KAAK,EAAE,2BAA2B,CAAC,KAAK,CAAC,IAAI;QAC7C,SAAS,EAAE,2BAA2B,CAAC,SAAS,CAAC,IAAI;QACrD,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,SAAS,EAAE,2BAA2B,CAAC,SAAS,CAAC,QAAQ;aAC1D;YACD,GAAG,CAAC,EAAE,SAAS,EAAE;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;oBACvD,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AUTH0_AUTH0_PAGES_PATHS } from './template-paths.js';
|
|
2
|
-
import { AUTH0_AUTH0_PAGES_RENDERERS } from './template-renderers.js';
|
|
3
|
-
import { AUTH0_AUTH0_PAGES_TEMPLATES } from './typed-templates.js';
|
|
4
|
-
export const AUTH0_AUTH0_PAGES_GENERATED = {
|
|
5
|
-
paths: AUTH0_AUTH0_PAGES_PATHS,
|
|
6
|
-
renderers: AUTH0_AUTH0_PAGES_RENDERERS,
|
|
7
|
-
templates: AUTH0_AUTH0_PAGES_TEMPLATES,
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-pages/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,2BAA2B;CACvC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Auth0Auth0PagesPaths {
|
|
2
|
-
login: string;
|
|
3
|
-
}
|
|
4
|
-
export declare const AUTH0_AUTH0_PAGES_PATHS: {
|
|
5
|
-
provider: import("@baseplate-dev/sync").ProviderType<Auth0Auth0PagesPaths>;
|
|
6
|
-
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
7
|
-
auth0Auth0PagesPaths: import("@baseplate-dev/sync").ProviderExport<Auth0Auth0PagesPaths>;
|
|
8
|
-
}, {
|
|
9
|
-
reactRoutes: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/react-generators").ReactRoutesProvider>;
|
|
10
|
-
}, undefined>;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=template-paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/auth0/generators/react/auth0-pages/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAoBD,eAAO,MAAM,uBAAuB;;;;;;;CAGnC,CAAC"}
|