@atlasauth/cli 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/args.d.ts +601 -0
- package/dist/args.js +289 -0
- package/dist/args.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/actions-gallery.d.ts +8 -0
- package/dist/commands/actions-gallery.js +197 -0
- package/dist/commands/actions-gallery.js.map +1 -0
- package/dist/commands/actions.d.ts +13 -0
- package/dist/commands/actions.js +135 -0
- package/dist/commands/actions.js.map +1 -0
- package/dist/commands/admin.d.ts +49 -0
- package/dist/commands/admin.js +353 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/commands/api-keys.d.ts +4 -0
- package/dist/commands/api-keys.js +96 -0
- package/dist/commands/api-keys.js.map +1 -0
- package/dist/commands/auth.d.ts +25 -0
- package/dist/commands/auth.js +102 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config.d.ts +104 -0
- package/dist/commands/config.js +1532 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/csp.d.ts +32 -0
- package/dist/commands/csp.js +180 -0
- package/dist/commands/csp.js.map +1 -0
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/dev.js +84 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/fga.d.ts +10 -0
- package/dist/commands/fga.js +146 -0
- package/dist/commands/fga.js.map +1 -0
- package/dist/commands/golive.d.ts +40 -0
- package/dist/commands/golive.js +285 -0
- package/dist/commands/golive.js.map +1 -0
- package/dist/commands/id-accounts.d.ts +13 -0
- package/dist/commands/id-accounts.js +195 -0
- package/dist/commands/id-accounts.js.map +1 -0
- package/dist/commands/import-better-auth.d.ts +3 -0
- package/dist/commands/import-better-auth.js +164 -0
- package/dist/commands/import-better-auth.js.map +1 -0
- package/dist/commands/import.d.ts +3 -0
- package/dist/commands/import.js +123 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +75 -0
- package/dist/commands/info.js +362 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +438 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/integrations.d.ts +8 -0
- package/dist/commands/integrations.js +112 -0
- package/dist/commands/integrations.js.map +1 -0
- package/dist/commands/listen.d.ts +17 -0
- package/dist/commands/listen.js +223 -0
- package/dist/commands/listen.js.map +1 -0
- package/dist/commands/mcp.d.ts +38 -0
- package/dist/commands/mcp.js +111 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/migrate.d.ts +16 -0
- package/dist/commands/migrate.js +114 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/move-origin.d.ts +11 -0
- package/dist/commands/move-origin.js +95 -0
- package/dist/commands/move-origin.js.map +1 -0
- package/dist/commands/operator.d.ts +18 -0
- package/dist/commands/operator.js +238 -0
- package/dist/commands/operator.js.map +1 -0
- package/dist/commands/orgs.d.ts +4 -0
- package/dist/commands/orgs.js +72 -0
- package/dist/commands/orgs.js.map +1 -0
- package/dist/commands/pages.d.ts +14 -0
- package/dist/commands/pages.js +113 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/commands/partner-platforms.d.ts +10 -0
- package/dist/commands/partner-platforms.js +157 -0
- package/dist/commands/partner-platforms.js.map +1 -0
- package/dist/commands/project-commands.d.ts +38 -0
- package/dist/commands/project-commands.js +361 -0
- package/dist/commands/project-commands.js.map +1 -0
- package/dist/commands/referrals.d.ts +69 -0
- package/dist/commands/referrals.js +1056 -0
- package/dist/commands/referrals.js.map +1 -0
- package/dist/commands/resources.d.ts +44 -0
- package/dist/commands/resources.js +234 -0
- package/dist/commands/resources.js.map +1 -0
- package/dist/commands/sessions.d.ts +4 -0
- package/dist/commands/sessions.js +28 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/shared.d.ts +38 -0
- package/dist/commands/shared.js +69 -0
- package/dist/commands/shared.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +77 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/users.d.ts +4 -0
- package/dist/commands/users.js +100 -0
- package/dist/commands/users.js.map +1 -0
- package/dist/commands/webhooks.d.ts +34 -0
- package/dist/commands/webhooks.js +301 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/config-http.d.ts +29 -0
- package/dist/config-http.js +64 -0
- package/dist/config-http.js.map +1 -0
- package/dist/config.d.ts +64 -0
- package/dist/config.js +69 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +72 -0
- package/dist/context.js +27 -0
- package/dist/context.js.map +1 -0
- package/dist/define-config.d.ts +9 -0
- package/dist/define-config.js +8 -0
- package/dist/define-config.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/help.d.ts +8 -0
- package/dist/help.js +868 -0
- package/dist/help.js.map +1 -0
- package/dist/import/csv.d.ts +6 -0
- package/dist/import/csv.js +63 -0
- package/dist/import/csv.js.map +1 -0
- package/dist/import/vendors.d.ts +57 -0
- package/dist/import/vendors.js +568 -0
- package/dist/import/vendors.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +21 -0
- package/dist/io.js +28 -0
- package/dist/io.js.map +1 -0
- package/dist/migrate/appwrite/plugin.d.ts +2 -0
- package/dist/migrate/appwrite/plugin.js +103 -0
- package/dist/migrate/appwrite/plugin.js.map +1 -0
- package/dist/migrate/auth0/plugin.d.ts +2 -0
- package/dist/migrate/auth0/plugin.js +126 -0
- package/dist/migrate/auth0/plugin.js.map +1 -0
- package/dist/migrate/authentik/plugin.d.ts +2 -0
- package/dist/migrate/authentik/plugin.js +135 -0
- package/dist/migrate/authentik/plugin.js.map +1 -0
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
- package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
- package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
- package/dist/migrate/better-auth/integration.d.ts +59 -0
- package/dist/migrate/better-auth/integration.js +81 -0
- package/dist/migrate/better-auth/integration.js.map +1 -0
- package/dist/migrate/better-auth/orchestrator.d.ts +43 -0
- package/dist/migrate/better-auth/orchestrator.js +525 -0
- package/dist/migrate/better-auth/orchestrator.js.map +1 -0
- package/dist/migrate/better-auth/output.d.ts +20 -0
- package/dist/migrate/better-auth/output.js +146 -0
- package/dist/migrate/better-auth/output.js.map +1 -0
- package/dist/migrate/better-auth/translate.d.ts +77 -0
- package/dist/migrate/better-auth/translate.js +1989 -0
- package/dist/migrate/better-auth/translate.js.map +1 -0
- package/dist/migrate/clerk/plugin.d.ts +2 -0
- package/dist/migrate/clerk/plugin.js +76 -0
- package/dist/migrate/clerk/plugin.js.map +1 -0
- package/dist/migrate/cognito/plugin.d.ts +5 -0
- package/dist/migrate/cognito/plugin.js +170 -0
- package/dist/migrate/cognito/plugin.js.map +1 -0
- package/dist/migrate/corbado/plugin.d.ts +2 -0
- package/dist/migrate/corbado/plugin.js +63 -0
- package/dist/migrate/corbado/plugin.js.map +1 -0
- package/dist/migrate/descope/plugin.d.ts +2 -0
- package/dist/migrate/descope/plugin.js +83 -0
- package/dist/migrate/descope/plugin.js.map +1 -0
- package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
- package/dist/migrate/entra-external-id/plugin.js +12 -0
- package/dist/migrate/entra-external-id/plugin.js.map +1 -0
- package/dist/migrate/export/appwrite-config.d.ts +28 -0
- package/dist/migrate/export/appwrite-config.js +170 -0
- package/dist/migrate/export/appwrite-config.js.map +1 -0
- package/dist/migrate/export/appwrite.d.ts +51 -0
- package/dist/migrate/export/appwrite.js +288 -0
- package/dist/migrate/export/appwrite.js.map +1 -0
- package/dist/migrate/export/auth0-config.d.ts +29 -0
- package/dist/migrate/export/auth0-config.js +249 -0
- package/dist/migrate/export/auth0-config.js.map +1 -0
- package/dist/migrate/export/auth0.d.ts +62 -0
- package/dist/migrate/export/auth0.js +575 -0
- package/dist/migrate/export/auth0.js.map +1 -0
- package/dist/migrate/export/authentik-config.d.ts +45 -0
- package/dist/migrate/export/authentik-config.js +357 -0
- package/dist/migrate/export/authentik-config.js.map +1 -0
- package/dist/migrate/export/authentik.d.ts +110 -0
- package/dist/migrate/export/authentik.js +838 -0
- package/dist/migrate/export/authentik.js.map +1 -0
- package/dist/migrate/export/azure-config.d.ts +58 -0
- package/dist/migrate/export/azure-config.js +344 -0
- package/dist/migrate/export/azure-config.js.map +1 -0
- package/dist/migrate/export/azure.d.ts +85 -0
- package/dist/migrate/export/azure.js +373 -0
- package/dist/migrate/export/azure.js.map +1 -0
- package/dist/migrate/export/clerk-config.d.ts +26 -0
- package/dist/migrate/export/clerk-config.js +227 -0
- package/dist/migrate/export/clerk-config.js.map +1 -0
- package/dist/migrate/export/clerk.d.ts +46 -0
- package/dist/migrate/export/clerk.js +486 -0
- package/dist/migrate/export/clerk.js.map +1 -0
- package/dist/migrate/export/cognito-config.d.ts +25 -0
- package/dist/migrate/export/cognito-config.js +273 -0
- package/dist/migrate/export/cognito-config.js.map +1 -0
- package/dist/migrate/export/cognito.d.ts +103 -0
- package/dist/migrate/export/cognito.js +441 -0
- package/dist/migrate/export/cognito.js.map +1 -0
- package/dist/migrate/export/corbado-config.d.ts +20 -0
- package/dist/migrate/export/corbado-config.js +63 -0
- package/dist/migrate/export/corbado-config.js.map +1 -0
- package/dist/migrate/export/corbado.d.ts +37 -0
- package/dist/migrate/export/corbado.js +132 -0
- package/dist/migrate/export/corbado.js.map +1 -0
- package/dist/migrate/export/descope.d.ts +35 -0
- package/dist/migrate/export/descope.js +208 -0
- package/dist/migrate/export/descope.js.map +1 -0
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +27 -0
- package/dist/migrate/export/fake-vendor.test-helper.js +41 -0
- package/dist/migrate/export/fake-vendor.test-helper.js.map +1 -0
- package/dist/migrate/export/firebase-config.d.ts +24 -0
- package/dist/migrate/export/firebase-config.js +215 -0
- package/dist/migrate/export/firebase-config.js.map +1 -0
- package/dist/migrate/export/firebase.d.ts +102 -0
- package/dist/migrate/export/firebase.js +464 -0
- package/dist/migrate/export/firebase.js.map +1 -0
- package/dist/migrate/export/frameworks/app-users.d.ts +42 -0
- package/dist/migrate/export/frameworks/app-users.js +161 -0
- package/dist/migrate/export/frameworks/app-users.js.map +1 -0
- package/dist/migrate/export/frameworks/authjs.d.ts +41 -0
- package/dist/migrate/export/frameworks/authjs.js +146 -0
- package/dist/migrate/export/frameworks/authjs.js.map +1 -0
- package/dist/migrate/export/frameworks/devise.d.ts +39 -0
- package/dist/migrate/export/frameworks/devise.js +218 -0
- package/dist/migrate/export/frameworks/devise.js.map +1 -0
- package/dist/migrate/export/frameworks/django.d.ts +45 -0
- package/dist/migrate/export/frameworks/django.js +315 -0
- package/dist/migrate/export/frameworks/django.js.map +1 -0
- package/dist/migrate/export/frameworks/lucia.d.ts +42 -0
- package/dist/migrate/export/frameworks/lucia.js +263 -0
- package/dist/migrate/export/frameworks/lucia.js.map +1 -0
- package/dist/migrate/export/frameworks/tables.d.ts +90 -0
- package/dist/migrate/export/frameworks/tables.js +325 -0
- package/dist/migrate/export/frameworks/tables.js.map +1 -0
- package/dist/migrate/export/frameworks/webauthn.d.ts +25 -0
- package/dist/migrate/export/frameworks/webauthn.js +130 -0
- package/dist/migrate/export/frameworks/webauthn.js.map +1 -0
- package/dist/migrate/export/frontegg-config.d.ts +29 -0
- package/dist/migrate/export/frontegg-config.js +238 -0
- package/dist/migrate/export/frontegg-config.js.map +1 -0
- package/dist/migrate/export/frontegg.d.ts +67 -0
- package/dist/migrate/export/frontegg.js +410 -0
- package/dist/migrate/export/frontegg.js.map +1 -0
- package/dist/migrate/export/fusionauth-config.d.ts +26 -0
- package/dist/migrate/export/fusionauth-config.js +226 -0
- package/dist/migrate/export/fusionauth-config.js.map +1 -0
- package/dist/migrate/export/fusionauth.d.ts +99 -0
- package/dist/migrate/export/fusionauth.js +642 -0
- package/dist/migrate/export/fusionauth.js.map +1 -0
- package/dist/migrate/export/hanko-config.d.ts +27 -0
- package/dist/migrate/export/hanko-config.js +265 -0
- package/dist/migrate/export/hanko-config.js.map +1 -0
- package/dist/migrate/export/hanko.d.ts +52 -0
- package/dist/migrate/export/hanko.js +605 -0
- package/dist/migrate/export/hanko.js.map +1 -0
- package/dist/migrate/export/keycloak-config.d.ts +19 -0
- package/dist/migrate/export/keycloak-config.js +219 -0
- package/dist/migrate/export/keycloak-config.js.map +1 -0
- package/dist/migrate/export/keycloak.d.ts +155 -0
- package/dist/migrate/export/keycloak.js +878 -0
- package/dist/migrate/export/keycloak.js.map +1 -0
- package/dist/migrate/export/kinde-descope-config.d.ts +38 -0
- package/dist/migrate/export/kinde-descope-config.js +172 -0
- package/dist/migrate/export/kinde-descope-config.js.map +1 -0
- package/dist/migrate/export/kinde.d.ts +57 -0
- package/dist/migrate/export/kinde.js +333 -0
- package/dist/migrate/export/kinde.js.map +1 -0
- package/dist/migrate/export/ldap.d.ts +53 -0
- package/dist/migrate/export/ldap.js +277 -0
- package/dist/migrate/export/ldap.js.map +1 -0
- package/dist/migrate/export/logto-config.d.ts +27 -0
- package/dist/migrate/export/logto-config.js +264 -0
- package/dist/migrate/export/logto-config.js.map +1 -0
- package/dist/migrate/export/logto.d.ts +150 -0
- package/dist/migrate/export/logto.js +809 -0
- package/dist/migrate/export/logto.js.map +1 -0
- package/dist/migrate/export/magic-config.d.ts +14 -0
- package/dist/migrate/export/magic-config.js +28 -0
- package/dist/migrate/export/magic-config.js.map +1 -0
- package/dist/migrate/export/magic.d.ts +31 -0
- package/dist/migrate/export/magic.js +93 -0
- package/dist/migrate/export/magic.js.map +1 -0
- package/dist/migrate/export/mini-yaml.d.ts +19 -0
- package/dist/migrate/export/mini-yaml.js +581 -0
- package/dist/migrate/export/mini-yaml.js.map +1 -0
- package/dist/migrate/export/nhost-config.d.ts +26 -0
- package/dist/migrate/export/nhost-config.js +360 -0
- package/dist/migrate/export/nhost-config.js.map +1 -0
- package/dist/migrate/export/nhost.d.ts +64 -0
- package/dist/migrate/export/nhost.js +304 -0
- package/dist/migrate/export/nhost.js.map +1 -0
- package/dist/migrate/export/okta-config.d.ts +30 -0
- package/dist/migrate/export/okta-config.js +205 -0
- package/dist/migrate/export/okta-config.js.map +1 -0
- package/dist/migrate/export/okta.d.ts +43 -0
- package/dist/migrate/export/okta.js +337 -0
- package/dist/migrate/export/okta.js.map +1 -0
- package/dist/migrate/export/onelogin.d.ts +22 -0
- package/dist/migrate/export/onelogin.js +123 -0
- package/dist/migrate/export/onelogin.js.map +1 -0
- package/dist/migrate/export/ory-config.d.ts +58 -0
- package/dist/migrate/export/ory-config.js +451 -0
- package/dist/migrate/export/ory-config.js.map +1 -0
- package/dist/migrate/export/ory.d.ts +81 -0
- package/dist/migrate/export/ory.js +555 -0
- package/dist/migrate/export/ory.js.map +1 -0
- package/dist/migrate/export/password-detect.d.ts +29 -0
- package/dist/migrate/export/password-detect.js +81 -0
- package/dist/migrate/export/password-detect.js.map +1 -0
- package/dist/migrate/export/pingone.d.ts +36 -0
- package/dist/migrate/export/pingone.js +218 -0
- package/dist/migrate/export/pingone.js.map +1 -0
- package/dist/migrate/export/plugin-kit.d.ts +25 -0
- package/dist/migrate/export/plugin-kit.js +82 -0
- package/dist/migrate/export/plugin-kit.js.map +1 -0
- package/dist/migrate/export/pocketbase-config.d.ts +28 -0
- package/dist/migrate/export/pocketbase-config.js +180 -0
- package/dist/migrate/export/pocketbase-config.js.map +1 -0
- package/dist/migrate/export/pocketbase.d.ts +52 -0
- package/dist/migrate/export/pocketbase.js +243 -0
- package/dist/migrate/export/pocketbase.js.map +1 -0
- package/dist/migrate/export/project-files.d.ts +15 -0
- package/dist/migrate/export/project-files.js +43 -0
- package/dist/migrate/export/project-files.js.map +1 -0
- package/dist/migrate/export/propelauth-config.d.ts +18 -0
- package/dist/migrate/export/propelauth-config.js +58 -0
- package/dist/migrate/export/propelauth-config.js.map +1 -0
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
- package/dist/migrate/export/propelauth.d.ts +48 -0
- package/dist/migrate/export/propelauth.js +255 -0
- package/dist/migrate/export/propelauth.js.map +1 -0
- package/dist/migrate/export/record-set.d.ts +44 -0
- package/dist/migrate/export/record-set.js +98 -0
- package/dist/migrate/export/record-set.js.map +1 -0
- package/dist/migrate/export/source-lines.d.ts +17 -0
- package/dist/migrate/export/source-lines.js +43 -0
- package/dist/migrate/export/source-lines.js.map +1 -0
- package/dist/migrate/export/sso-metadata.d.ts +47 -0
- package/dist/migrate/export/sso-metadata.js +180 -0
- package/dist/migrate/export/sso-metadata.js.map +1 -0
- package/dist/migrate/export/stytch-config.d.ts +22 -0
- package/dist/migrate/export/stytch-config.js +102 -0
- package/dist/migrate/export/stytch-config.js.map +1 -0
- package/dist/migrate/export/stytch.d.ts +68 -0
- package/dist/migrate/export/stytch.js +510 -0
- package/dist/migrate/export/stytch.js.map +1 -0
- package/dist/migrate/export/supabase-config.d.ts +48 -0
- package/dist/migrate/export/supabase-config.js +408 -0
- package/dist/migrate/export/supabase-config.js.map +1 -0
- package/dist/migrate/export/supabase.d.ts +86 -0
- package/dist/migrate/export/supabase.js +524 -0
- package/dist/migrate/export/supabase.js.map +1 -0
- package/dist/migrate/export/supertokens-config.d.ts +20 -0
- package/dist/migrate/export/supertokens-config.js +150 -0
- package/dist/migrate/export/supertokens-config.js.map +1 -0
- package/dist/migrate/export/supertokens.d.ts +125 -0
- package/dist/migrate/export/supertokens.js +464 -0
- package/dist/migrate/export/supertokens.js.map +1 -0
- package/dist/migrate/export/table.d.ts +35 -0
- package/dist/migrate/export/table.js +248 -0
- package/dist/migrate/export/table.js.map +1 -0
- package/dist/migrate/export/translate-kit.d.ts +46 -0
- package/dist/migrate/export/translate-kit.js +148 -0
- package/dist/migrate/export/translate-kit.js.map +1 -0
- package/dist/migrate/export/userfront-config.d.ts +15 -0
- package/dist/migrate/export/userfront-config.js +49 -0
- package/dist/migrate/export/userfront-config.js.map +1 -0
- package/dist/migrate/export/userfront.d.ts +38 -0
- package/dist/migrate/export/userfront.js +189 -0
- package/dist/migrate/export/userfront.js.map +1 -0
- package/dist/migrate/export/vendor-http.d.ts +46 -0
- package/dist/migrate/export/vendor-http.js +138 -0
- package/dist/migrate/export/vendor-http.js.map +1 -0
- package/dist/migrate/export/workos-config.d.ts +23 -0
- package/dist/migrate/export/workos-config.js +125 -0
- package/dist/migrate/export/workos-config.js.map +1 -0
- package/dist/migrate/export/workos.d.ts +46 -0
- package/dist/migrate/export/workos.js +272 -0
- package/dist/migrate/export/workos.js.map +1 -0
- package/dist/migrate/export/zip.d.ts +8 -0
- package/dist/migrate/export/zip.js +66 -0
- package/dist/migrate/export/zip.js.map +1 -0
- package/dist/migrate/export/zitadel-config.d.ts +37 -0
- package/dist/migrate/export/zitadel-config.js +279 -0
- package/dist/migrate/export/zitadel-config.js.map +1 -0
- package/dist/migrate/export/zitadel.d.ts +82 -0
- package/dist/migrate/export/zitadel.js +447 -0
- package/dist/migrate/export/zitadel.js.map +1 -0
- package/dist/migrate/firebase/plugin.d.ts +2 -0
- package/dist/migrate/firebase/plugin.js +152 -0
- package/dist/migrate/firebase/plugin.js.map +1 -0
- package/dist/migrate/framework/builtins.d.ts +2 -0
- package/dist/migrate/framework/builtins.js +52 -0
- package/dist/migrate/framework/builtins.js.map +1 -0
- package/dist/migrate/framework/commands.d.ts +20 -0
- package/dist/migrate/framework/commands.js +58 -0
- package/dist/migrate/framework/commands.js.map +1 -0
- package/dist/migrate/framework/custom.d.ts +12 -0
- package/dist/migrate/framework/custom.js +96 -0
- package/dist/migrate/framework/custom.js.map +1 -0
- package/dist/migrate/framework/orchestrator.d.ts +113 -0
- package/dist/migrate/framework/orchestrator.js +532 -0
- package/dist/migrate/framework/orchestrator.js.map +1 -0
- package/dist/migrate/framework/plugin.d.ts +167 -0
- package/dist/migrate/framework/plugin.js +3 -0
- package/dist/migrate/framework/plugin.js.map +1 -0
- package/dist/migrate/framework/registry.d.ts +11 -0
- package/dist/migrate/framework/registry.js +44 -0
- package/dist/migrate/framework/registry.js.map +1 -0
- package/dist/migrate/framework/report.d.ts +17 -0
- package/dist/migrate/framework/report.js +103 -0
- package/dist/migrate/framework/report.js.map +1 -0
- package/dist/migrate/frameworks/plugins.d.ts +29 -0
- package/dist/migrate/frameworks/plugins.js +402 -0
- package/dist/migrate/frameworks/plugins.js.map +1 -0
- package/dist/migrate/frameworks/report.d.ts +92 -0
- package/dist/migrate/frameworks/report.js +207 -0
- package/dist/migrate/frameworks/report.js.map +1 -0
- package/dist/migrate/frameworks/translate-js.d.ts +5 -0
- package/dist/migrate/frameworks/translate-js.js +503 -0
- package/dist/migrate/frameworks/translate-js.js.map +1 -0
- package/dist/migrate/frameworks/translate-rails-django.d.ts +3 -0
- package/dist/migrate/frameworks/translate-rails-django.js +1391 -0
- package/dist/migrate/frameworks/translate-rails-django.js.map +1 -0
- package/dist/migrate/frontegg/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.js +78 -0
- package/dist/migrate/frontegg/plugin.js.map +1 -0
- package/dist/migrate/fusionauth/plugin.d.ts +2 -0
- package/dist/migrate/fusionauth/plugin.js +109 -0
- package/dist/migrate/fusionauth/plugin.js.map +1 -0
- package/dist/migrate/hanko/plugin.d.ts +2 -0
- package/dist/migrate/hanko/plugin.js +100 -0
- package/dist/migrate/hanko/plugin.js.map +1 -0
- package/dist/migrate/keycloak/plugin.d.ts +2 -0
- package/dist/migrate/keycloak/plugin.js +148 -0
- package/dist/migrate/keycloak/plugin.js.map +1 -0
- package/dist/migrate/kinde/plugin.d.ts +2 -0
- package/dist/migrate/kinde/plugin.js +105 -0
- package/dist/migrate/kinde/plugin.js.map +1 -0
- package/dist/migrate/ldap/plugin.d.ts +2 -0
- package/dist/migrate/ldap/plugin.js +73 -0
- package/dist/migrate/ldap/plugin.js.map +1 -0
- package/dist/migrate/logto/plugin.d.ts +2 -0
- package/dist/migrate/logto/plugin.js +131 -0
- package/dist/migrate/logto/plugin.js.map +1 -0
- package/dist/migrate/magic/plugin.d.ts +2 -0
- package/dist/migrate/magic/plugin.js +56 -0
- package/dist/migrate/magic/plugin.js.map +1 -0
- package/dist/migrate/nhost/plugin.d.ts +2 -0
- package/dist/migrate/nhost/plugin.js +115 -0
- package/dist/migrate/nhost/plugin.js.map +1 -0
- package/dist/migrate/oidc/plugin.d.ts +2 -0
- package/dist/migrate/oidc/plugin.js +73 -0
- package/dist/migrate/oidc/plugin.js.map +1 -0
- package/dist/migrate/okta/plugin.d.ts +2 -0
- package/dist/migrate/okta/plugin.js +105 -0
- package/dist/migrate/okta/plugin.js.map +1 -0
- package/dist/migrate/onelogin/plugin.d.ts +2 -0
- package/dist/migrate/onelogin/plugin.js +61 -0
- package/dist/migrate/onelogin/plugin.js.map +1 -0
- package/dist/migrate/ory/plugin.d.ts +2 -0
- package/dist/migrate/ory/plugin.js +186 -0
- package/dist/migrate/ory/plugin.js.map +1 -0
- package/dist/migrate/ping-identity/plugin.d.ts +2 -0
- package/dist/migrate/ping-identity/plugin.js +100 -0
- package/dist/migrate/ping-identity/plugin.js.map +1 -0
- package/dist/migrate/pocketbase/plugin.d.ts +2 -0
- package/dist/migrate/pocketbase/plugin.js +99 -0
- package/dist/migrate/pocketbase/plugin.js.map +1 -0
- package/dist/migrate/propelauth/plugin.d.ts +2 -0
- package/dist/migrate/propelauth/plugin.js +65 -0
- package/dist/migrate/propelauth/plugin.js.map +1 -0
- package/dist/migrate/saml/plugin.d.ts +2 -0
- package/dist/migrate/saml/plugin.js +79 -0
- package/dist/migrate/saml/plugin.js.map +1 -0
- package/dist/migrate/stytch/plugin.d.ts +2 -0
- package/dist/migrate/stytch/plugin.js +97 -0
- package/dist/migrate/stytch/plugin.js.map +1 -0
- package/dist/migrate/supabase/plugin.d.ts +2 -0
- package/dist/migrate/supabase/plugin.js +149 -0
- package/dist/migrate/supabase/plugin.js.map +1 -0
- package/dist/migrate/supertokens/plugin.d.ts +2 -0
- package/dist/migrate/supertokens/plugin.js +114 -0
- package/dist/migrate/supertokens/plugin.js.map +1 -0
- package/dist/migrate/user-table/plugin.d.ts +2 -0
- package/dist/migrate/user-table/plugin.js +62 -0
- package/dist/migrate/user-table/plugin.js.map +1 -0
- package/dist/migrate/userfront/plugin.d.ts +2 -0
- package/dist/migrate/userfront/plugin.js +60 -0
- package/dist/migrate/userfront/plugin.js.map +1 -0
- package/dist/migrate/workos/plugin.d.ts +2 -0
- package/dist/migrate/workos/plugin.js +81 -0
- package/dist/migrate/workos/plugin.js.map +1 -0
- package/dist/migrate/zitadel/plugin.d.ts +2 -0
- package/dist/migrate/zitadel/plugin.js +114 -0
- package/dist/migrate/zitadel/plugin.js.map +1 -0
- package/dist/output.d.ts +41 -0
- package/dist/output.js +72 -0
- package/dist/output.js.map +1 -0
- package/dist/project.d.ts +64 -0
- package/dist/project.js +86 -0
- package/dist/project.js.map +1 -0
- package/dist/prompt.d.ts +15 -0
- package/dist/prompt.js +46 -0
- package/dist/prompt.js.map +1 -0
- package/dist/run.d.ts +12 -0
- package/dist/run.js +157 -0
- package/dist/run.js.map +1 -0
- package/dist/secrets.d.ts +41 -0
- package/dist/secrets.js +142 -0
- package/dist/secrets.js.map +1 -0
- package/dist/serialize.d.ts +30 -0
- package/dist/serialize.js +131 -0
- package/dist/serialize.js.map +1 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchSupertokensConfig = fetchSupertokensConfig;
|
|
4
|
+
exports.translateSupertokensConfig = translateSupertokensConfig;
|
|
5
|
+
const supertokens_1 = require("./supertokens");
|
|
6
|
+
const record_set_1 = require("./record-set");
|
|
7
|
+
const translate_kit_1 = require("./translate-kit");
|
|
8
|
+
const vendor_http_1 = require("./vendor-http");
|
|
9
|
+
async function fetchSupertokensConfig(http, origin, appId) {
|
|
10
|
+
let tenants = [];
|
|
11
|
+
try {
|
|
12
|
+
tenants = await (0, supertokens_1.listTenants)(http, appId);
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
if (!(err instanceof vendor_http_1.VendorApiError) || ![401, 403, 404, 501].includes(err.status))
|
|
16
|
+
throw err;
|
|
17
|
+
}
|
|
18
|
+
// A core without the multitenancy listing still has the public tenant's single-tenant view.
|
|
19
|
+
if (!tenants.length) {
|
|
20
|
+
try {
|
|
21
|
+
const { body } = await http.get(`${(0, supertokens_1.corePrefix)(appId, 'public')}/recipe/multitenancy/tenant?tenantId=public`);
|
|
22
|
+
if ((0, record_set_1.isObj)(body))
|
|
23
|
+
tenants = [body];
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (!(err instanceof vendor_http_1.VendorApiError) || ![401, 403, 404, 501].includes(err.status))
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return { origin, appId, tenants };
|
|
31
|
+
}
|
|
32
|
+
const enabled = (v) => (0, record_set_1.isObj)(v) && v.enabled === true;
|
|
33
|
+
const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : undefined);
|
|
34
|
+
/** Core defaults when the tenant's config does not override them. */
|
|
35
|
+
const DEFAULT_REFRESH_MINUTES = 144_000;
|
|
36
|
+
function translateSupertokensConfig(snap) {
|
|
37
|
+
const b = new translate_kit_1.ConfigBuilder();
|
|
38
|
+
const pub = snap.tenants.find((t) => (0, record_set_1.str)(t.tenantId) === 'public') ?? snap.tenants[0];
|
|
39
|
+
if (!pub) {
|
|
40
|
+
b.add('manual', 'core', 'tenant list', 'The core did not return its tenants (check the API key): nothing to translate. Your recipes live in supertokens.init in your backend; list them by hand.');
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const first = (0, record_set_1.strs)(pub.firstFactors);
|
|
44
|
+
const hasFirst = (...f) => f.some((x) => first.includes(x));
|
|
45
|
+
// firstFactors is absent on older cores: fall back to the recipes' enabled flags.
|
|
46
|
+
const legacy = first.length === 0;
|
|
47
|
+
// ── recipes and first factors ──
|
|
48
|
+
if (enabled(pub.emailPassword) && (legacy || hasFirst('emailpassword'))) {
|
|
49
|
+
b.set('strategies.password', true);
|
|
50
|
+
b.add('differs', 'recipes emailpassword', 'emailPassword.enabled', 'Password sign-in. The core API never returns password hashes: export from the core database (bcrypt and Argon2 verify as they are) or use the supertokens lazy-migration preset.', 'auth_config.strategies.password');
|
|
51
|
+
}
|
|
52
|
+
if (enabled(pub.passwordless)) {
|
|
53
|
+
if (legacy || hasFirst('otp-email')) {
|
|
54
|
+
b.set('strategies.emailCode', true);
|
|
55
|
+
b.add('mapped', 'recipes passwordless', 'firstFactors otp-email', 'Email one-time codes.', 'auth_config.strategies.emailCode');
|
|
56
|
+
}
|
|
57
|
+
if (legacy || hasFirst('link-email')) {
|
|
58
|
+
b.set('strategies.emailLink', true);
|
|
59
|
+
b.add('mapped', 'recipes passwordless', 'firstFactors link-email', 'Email magic links.', 'auth_config.strategies.emailLink');
|
|
60
|
+
}
|
|
61
|
+
if (legacy || hasFirst('otp-phone')) {
|
|
62
|
+
b.set('strategies.phoneCode', true);
|
|
63
|
+
b.add('mapped', 'recipes passwordless', 'firstFactors otp-phone', 'SMS codes (bring your own SMS provider).', 'auth_config.strategies.phoneCode');
|
|
64
|
+
}
|
|
65
|
+
if (hasFirst('link-phone'))
|
|
66
|
+
b.add('differs', 'recipes passwordless', 'firstFactors link-phone', 'SMS magic links have no Atlas counterpart: use SMS codes.', 'auth_config.strategies.phoneCode');
|
|
67
|
+
}
|
|
68
|
+
// ── third-party providers ──
|
|
69
|
+
const providers = (0, record_set_1.isObj)(pub.thirdParty) ? (0, record_set_1.objs)(pub.thirdParty.providers) : [];
|
|
70
|
+
if (enabled(pub.thirdParty) || providers.length) {
|
|
71
|
+
for (const p of providers) {
|
|
72
|
+
const id = (0, record_set_1.str)(p.thirdPartyId) ?? '';
|
|
73
|
+
const name = (0, record_set_1.str)(p.name) ?? id;
|
|
74
|
+
const clients = (0, record_set_1.objs)(p.clients);
|
|
75
|
+
const client = clients[0];
|
|
76
|
+
const key = (0, translate_kit_1.socialKey)(id);
|
|
77
|
+
if (!key) {
|
|
78
|
+
b.add('manual', 'recipes thirdparty', `${name} (${id})`, 'No built-in Atlas provider: add it as a custom OAuth provider (or an SSO connection for SAML via Boxy).', 'custom_oauth_providers');
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
b.socialProvider({ atlasKey: key, vendorName: name, area: 'recipes thirdparty', setting: `${name} (${id})`, clientId: (0, record_set_1.str)(client?.clientId), scopes: (0, record_set_1.strs)(client?.scope) });
|
|
82
|
+
if (clients.length > 1)
|
|
83
|
+
b.add('differs', 'recipes thirdparty', `${name} clients`, `${clients.length} OAuth clients (web, mobile…): Atlas keeps one per provider; add the others as native-app credentials.`, `oauth_providers ${key}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// ── multi-factor ──
|
|
87
|
+
const second = (0, record_set_1.strs)(pub.requiredSecondaryFactors);
|
|
88
|
+
if (second.includes('totp')) {
|
|
89
|
+
b.set('mfa.factors.totp', true);
|
|
90
|
+
b.add('mapped', 'recipes multifactorauth', 'requiredSecondaryFactors totp', 'Authenticator apps; verified TOTP devices move with a database export.', 'auth_config.mfa.factors.totp');
|
|
91
|
+
}
|
|
92
|
+
for (const f of second.filter((x) => x !== 'totp')) {
|
|
93
|
+
const channel = f === 'otp-email' ? 'emailCode' : null;
|
|
94
|
+
if (channel) {
|
|
95
|
+
b.set('mfa.factors.emailCode', true);
|
|
96
|
+
b.add('mapped', 'recipes multifactorauth', `requiredSecondaryFactors ${f}`, 'Email code as a second factor.', 'auth_config.mfa.factors.emailCode');
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
b.add('differs', 'recipes multifactorauth', `requiredSecondaryFactors ${f}`, 'Atlas recommends authenticator apps or passkeys as the second factor; enable the factors you want in auth_config.mfa.', 'auth_config.mfa');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (second.length) {
|
|
103
|
+
b.set('mfaPolicy', 'required');
|
|
104
|
+
b.add('differs', 'recipes multifactorauth', 'requiredSecondaryFactors', 'A second factor on every sign-in. If your backend decides per user (the MFA recipe\'s getMFARequirementsForAuth override), set the policy to optional and use step-up for the sensitive routes.', 'auth_config.mfaPolicy');
|
|
105
|
+
}
|
|
106
|
+
else if ((0, record_set_1.strs)(pub.firstFactors).length) {
|
|
107
|
+
b.add('manual', 'recipes multifactorauth', 'getMFARequirementsForAuth override', 'MFA requirements set in code (supertokens.init) are not visible to the core: port them to the Atlas MFA policy or step-up rules.', 'auth_config.mfaPolicy');
|
|
108
|
+
}
|
|
109
|
+
// ── core configuration ──
|
|
110
|
+
const core = (0, record_set_1.isObj)(pub.coreConfig) ? pub.coreConfig : {};
|
|
111
|
+
const refresh = num(core.refresh_token_validity) ?? DEFAULT_REFRESH_MINUTES;
|
|
112
|
+
b.set('session.absoluteMs', (0, translate_kit_1.clampSessionMs)(refresh * 60_000));
|
|
113
|
+
b.add('mapped', 'core config', 'refresh_token_validity', `${refresh} minutes (the session lives as long as its refresh token); Atlas caps a session at 90 days.`, 'auth_config.session.absoluteMs');
|
|
114
|
+
const access = num(core.access_token_validity);
|
|
115
|
+
if (access !== undefined)
|
|
116
|
+
b.add('differs', 'core config', 'access_token_validity', `SuperTokens access tokens lived ${access}s. Atlas session tokens are short-lived and refreshed by its SDKs (auth_config.session.jwtTtlSeconds).`, 'auth_config.session.jwtTtlSeconds');
|
|
117
|
+
const codeLife = num(core.passwordless_code_lifetime);
|
|
118
|
+
if (codeLife !== undefined) {
|
|
119
|
+
const minutes = Math.max(1, Math.round(codeLife / 60_000));
|
|
120
|
+
b.set('verification.emailCode.ttlMinutes', minutes);
|
|
121
|
+
b.add('mapped', 'core config', 'passwordless_code_lifetime', `Codes live ${minutes} minute(s).`, 'auth_config.verification.emailCode.ttlMinutes');
|
|
122
|
+
}
|
|
123
|
+
const attempts = num(core.passwordless_max_code_input_attempts);
|
|
124
|
+
if (attempts !== undefined) {
|
|
125
|
+
b.set('verification.emailCode.maxAttempts', attempts);
|
|
126
|
+
b.add('mapped', 'core config', 'passwordless_max_code_input_attempts', `${attempts} attempts per code.`, 'auth_config.verification.emailCode.maxAttempts');
|
|
127
|
+
}
|
|
128
|
+
for (const k of ['password_reset_token_lifetime', 'email_verification_token_lifetime']) {
|
|
129
|
+
if (num(core[k]) !== undefined)
|
|
130
|
+
b.add('differs', 'core config', k, 'Atlas link and code lifetimes are instance settings; review auth_config.verification.', 'auth_config.verification');
|
|
131
|
+
}
|
|
132
|
+
if (core.totp_max_attempts !== undefined || core.totp_rate_limit_cooldown_sec !== undefined) {
|
|
133
|
+
b.add('differs', 'core config', 'totp_max_attempts / totp_rate_limit_cooldown_sec', 'Atlas throttles failed second-factor attempts per account and IP.', 'auth_config.rateLimit');
|
|
134
|
+
}
|
|
135
|
+
// ── other tenants ──
|
|
136
|
+
const others = snap.tenants.filter((t) => t !== pub);
|
|
137
|
+
for (const t of others) {
|
|
138
|
+
b.add('differs', `tenants ${(0, record_set_1.str)(t.tenantId) ?? '?'}`, 'tenant', 'A tenant becomes an organization with the data export; its own enabled recipes and providers are not translated: configure per-organization SSO connections for them.', 'organizations');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// ── what the core never sees ──
|
|
142
|
+
b.add('manual', 'backend config', 'supertokens.init override functions', 'Recipe overrides (custom sign-up rules, claims, email and SMS delivery) live in your backend: port sign-up rules to Atlas actions, claims to a JWT template, and delivery to your own email / SMS provider.', 'actions');
|
|
143
|
+
b.add('manual', 'backend config', 'EmailVerification mode (REQUIRED / OPTIONAL)', 'The mode is set in supertokens.init, not in the core: set auth_config.requireEmailVerification to match it.', 'auth_config.requireEmailVerification');
|
|
144
|
+
b.add('manual', 'backend config', 'appInfo (apiDomain, websiteDomain, cookieDomain)', 'Add your website origin to the instance allowed origins; set the cross-subdomain cookie setting if you used cookieDomain.', 'instance.allowed_origins');
|
|
145
|
+
// The bridge needs the app's API domain (apiDomain), not the core's address: the plugin asks for it.
|
|
146
|
+
return b.result(`SuperTokens core ${snap.origin} (app ${snap.appId})`, {
|
|
147
|
+
lazy: { preset: 'supertokens', config: { base_url: snap.origin } },
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=supertokens-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supertokens-config.js","sourceRoot":"","sources":["../../../src/migrate/export/supertokens-config.ts"],"names":[],"mappings":";;AAsBA,wDAiBC;AAQD,gEAgHC;AA9JD,+CAAwD;AACxD,6CAAgE;AAChE,mDAA2E;AAC3E,+CAAgE;AAkBzD,KAAK,UAAU,sBAAsB,CAAC,IAAgB,EAAE,MAAc,EAAE,KAAa;IAC1F,IAAI,OAAO,GAAU,EAAE,CAAC;IACxB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,IAAA,yBAAW,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,YAAY,4BAAc,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,MAAM,GAAG,CAAC;IAChG,CAAC;IACD,4FAA4F;IAC5F,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAM,GAAG,IAAA,wBAAU,EAAC,KAAK,EAAE,QAAQ,CAAC,6C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,uBAAuB,CAAC,CAAC;QACpL,CAAC;QACD,sBAAsB;QACtB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QACrD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACvB,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,IAAA,gBAAG,EAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,uKAAuK,EAAE,eAAe,CAAC,CAAC;QAC5P,CAAC;IACH,CAAC;IAED,iCAAiC;IACjC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,EAAE,qCAAqC,EAAE,6MAA6M,EAAE,SAAS,CAAC,CAAC;IACnS,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,EAAE,8CAA8C,EAAE,6GAA6G,EAAE,sCAAsC,CAAC,CAAC;IACzO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,EAAE,kDAAkD,EAAE,2HAA2H,EAAE,0BAA0B,CAAC,CAAC;IAE/O,qGAAqG;IACrG,OAAO,CAAC,CAAC,MAAM,CAAC,oBAAoB,IAAI,CAAC,MAAM,SAAS,IAAI,CAAC,KAAK,GAAG,EAAE;QACrE,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;KACnE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { PasswordHash, Timestamp } from '@atlasauth/migrate';
|
|
2
|
+
import { type Tables } from './frameworks/tables';
|
|
3
|
+
import { RecordSet, type Obj } from './record-set';
|
|
4
|
+
import { VendorHttp } from './vendor-http';
|
|
5
|
+
/**
|
|
6
|
+
* `atlas migrate export supertokens` — a SuperTokens core (self-hosted, or the
|
|
7
|
+
* managed service) onto the canonical bundle models. Two ways in:
|
|
8
|
+
*
|
|
9
|
+
* - a DATABASE DUMP of the core (one file per table, made with
|
|
10
|
+
* `psql \copy … csv header`, see the guide): everything the core keeps —
|
|
11
|
+
* password hashes (bcrypt, Argon2), TOTP device secrets, email verification
|
|
12
|
+
* state, user metadata, roles, tenants, user id mappings;
|
|
13
|
+
* - the core's HTTP API with its API key (`GET /users`, `/recipe/user/…`,
|
|
14
|
+
* `/recipe/roles`, `/recipe/multitenancy/tenant/list`): users, linked
|
|
15
|
+
* login methods, verified flags, metadata, roles and tenants. The API never
|
|
16
|
+
* returns password hashes or TOTP secrets: those users move by lazy
|
|
17
|
+
* migration / enrol again.
|
|
18
|
+
*
|
|
19
|
+
* What maps where:
|
|
20
|
+
* - users: one Atlas user per SuperTokens PRIMARY user (account linking
|
|
21
|
+
* folds emailpassword, thirdparty and passwordless login methods into one);
|
|
22
|
+
* the id is the id the app sees (`userid_mapping` external id when set), the
|
|
23
|
+
* `sub` of every access token;
|
|
24
|
+
* - emails (verified from `emailverification_verified_emails`; passwordless
|
|
25
|
+
* addresses and phone numbers are verified by the sign-in itself);
|
|
26
|
+
* - passwords: bcrypt and Argon2 PHC strings as they are; anything else is
|
|
27
|
+
* counted and left for lazy migration;
|
|
28
|
+
* - third-party links as identities (`thirdparty_users`);
|
|
29
|
+
* - roles (app roles with their permissions; roles a user holds on the
|
|
30
|
+
* public tenant) and tenants (every non-public tenant becomes an
|
|
31
|
+
* organization, its users members, roles held there their organization role);
|
|
32
|
+
* - verified TOTP devices as authenticator-app factors;
|
|
33
|
+
* - user metadata as private metadata (names carried over when present).
|
|
34
|
+
*/
|
|
35
|
+
export interface SupertokensExportOptions {
|
|
36
|
+
/** A dump of the core database (one table per file). */
|
|
37
|
+
tables?: Tables;
|
|
38
|
+
/** The core's address (`https://st-dev-abc.aws.supertokens.io`, `http://core:3567`). */
|
|
39
|
+
connectionUri?: string;
|
|
40
|
+
/** The core's API key (`api-key` header). */
|
|
41
|
+
apiKey?: string;
|
|
42
|
+
/** The SuperTokens app id (multi-app cores); `public` by default. */
|
|
43
|
+
appId?: string;
|
|
44
|
+
/** The `table_names_prefix` the core runs with, when it has one. */
|
|
45
|
+
tablePrefix?: string;
|
|
46
|
+
fetchImpl?: typeof fetch;
|
|
47
|
+
sleep?: (ms: number) => Promise<void>;
|
|
48
|
+
onProgress?: (message: string) => void;
|
|
49
|
+
}
|
|
50
|
+
/** One way of signing in as seen by the core (a recipe user). */
|
|
51
|
+
export interface LoginMethod {
|
|
52
|
+
recipeUserId: string;
|
|
53
|
+
recipeId: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
phone?: string;
|
|
56
|
+
thirdParty?: {
|
|
57
|
+
id: string;
|
|
58
|
+
userId: string;
|
|
59
|
+
};
|
|
60
|
+
passwordHash?: string;
|
|
61
|
+
verified: boolean;
|
|
62
|
+
timeJoined?: Timestamp;
|
|
63
|
+
tenantIds: string[];
|
|
64
|
+
}
|
|
65
|
+
/** A primary user and the login methods linked to it. */
|
|
66
|
+
export interface StUser {
|
|
67
|
+
/** The primary user id (before any `userid_mapping`). */
|
|
68
|
+
id: string;
|
|
69
|
+
loginMethods: LoginMethod[];
|
|
70
|
+
timeJoined?: Timestamp;
|
|
71
|
+
}
|
|
72
|
+
export interface TotpDevice {
|
|
73
|
+
name?: string;
|
|
74
|
+
secret?: string;
|
|
75
|
+
period?: number;
|
|
76
|
+
verified: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface SupertokensSnapshot {
|
|
79
|
+
source: 'database' | 'api';
|
|
80
|
+
users: StUser[];
|
|
81
|
+
/** User id → metadata object. */
|
|
82
|
+
metadata: Map<string, Obj>;
|
|
83
|
+
/** Role → permissions. */
|
|
84
|
+
roles: Map<string, string[]>;
|
|
85
|
+
userRoles: Array<{
|
|
86
|
+
userId: string;
|
|
87
|
+
tenantId: string;
|
|
88
|
+
role: string;
|
|
89
|
+
}>;
|
|
90
|
+
/** Tenant ids other than `public`. */
|
|
91
|
+
tenants: string[];
|
|
92
|
+
/** User id → TOTP devices (a database dump; the API carries no secrets). */
|
|
93
|
+
totp: Map<string, TotpDevice[]>;
|
|
94
|
+
/** User id → last active time (epoch ms). */
|
|
95
|
+
lastActive: Map<string, number>;
|
|
96
|
+
/** SuperTokens user id → the external id the app uses. */
|
|
97
|
+
idMappings: Map<string, string>;
|
|
98
|
+
warnings: string[];
|
|
99
|
+
}
|
|
100
|
+
export declare function exportSupertokens(opts: SupertokensExportOptions): Promise<RecordSet>;
|
|
101
|
+
/** `st-dev-x.aws.supertokens.io` → `https://st-dev-x.aws.supertokens.io`; an http address is kept (a core inside your network). */
|
|
102
|
+
export declare function normalizeCoreUri(raw: string): string;
|
|
103
|
+
export declare function snapshotFromTables(tables: Tables, appId: string, prefix?: string): SupertokensSnapshot;
|
|
104
|
+
/** A core client: the API key header, the app and tenant path prefixes. */
|
|
105
|
+
export declare function supertokensHttp(o: {
|
|
106
|
+
connectionUri: string;
|
|
107
|
+
apiKey?: string;
|
|
108
|
+
fetchImpl?: typeof fetch;
|
|
109
|
+
sleep?: (ms: number) => Promise<void>;
|
|
110
|
+
}): VendorHttp;
|
|
111
|
+
/** `/appid-<app>/<tenant>` path prefix of an app and tenant on the core (public → none). */
|
|
112
|
+
export declare function corePrefix(appId: string, tenantId: string): string;
|
|
113
|
+
/** The tenants of an app, from the multitenancy recipe (older cores answer on the v1 path). */
|
|
114
|
+
export declare function listTenants(http: VendorHttp, appId: string): Promise<Obj[]>;
|
|
115
|
+
export declare function fetchSupertokensSnapshot(o: SupertokensExportOptions & {
|
|
116
|
+
connectionUri: string;
|
|
117
|
+
appId: string;
|
|
118
|
+
onProgress: (m: string) => void;
|
|
119
|
+
}): Promise<SupertokensSnapshot>;
|
|
120
|
+
/** A SuperTokens `password_hash` → the bundle's password; null for a shape Atlas cannot verify. */
|
|
121
|
+
export declare function mapSupertokensPassword(hash: unknown): PasswordHash | null;
|
|
122
|
+
export declare function buildSupertokensRecordSet(snap: SupertokensSnapshot, o: {
|
|
123
|
+
origin: string;
|
|
124
|
+
appId: string;
|
|
125
|
+
}): RecordSet;
|