@atlasauth/cli 0.24.0 → 0.25.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 +6 -0
- package/package.json +4 -4
- package/dist/args.d.ts +0 -601
- package/dist/args.js +0 -289
- package/dist/args.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -19
- package/dist/cli.js.map +0 -1
- package/dist/commands/actions-gallery.d.ts +0 -8
- package/dist/commands/actions-gallery.js +0 -197
- package/dist/commands/actions-gallery.js.map +0 -1
- package/dist/commands/actions.d.ts +0 -13
- package/dist/commands/actions.js +0 -135
- package/dist/commands/actions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -49
- package/dist/commands/admin.js +0 -353
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/api-keys.d.ts +0 -4
- package/dist/commands/api-keys.js +0 -96
- package/dist/commands/api-keys.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -25
- package/dist/commands/auth.js +0 -102
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/config.d.ts +0 -104
- package/dist/commands/config.js +0 -1506
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/csp.d.ts +0 -32
- package/dist/commands/csp.js +0 -180
- package/dist/commands/csp.js.map +0 -1
- package/dist/commands/dev.d.ts +0 -8
- package/dist/commands/dev.js +0 -84
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/fga.d.ts +0 -10
- package/dist/commands/fga.js +0 -146
- package/dist/commands/fga.js.map +0 -1
- package/dist/commands/golive.d.ts +0 -40
- package/dist/commands/golive.js +0 -285
- package/dist/commands/golive.js.map +0 -1
- package/dist/commands/id-accounts.d.ts +0 -13
- package/dist/commands/id-accounts.js +0 -195
- package/dist/commands/id-accounts.js.map +0 -1
- package/dist/commands/import-better-auth.d.ts +0 -3
- package/dist/commands/import-better-auth.js +0 -164
- package/dist/commands/import-better-auth.js.map +0 -1
- package/dist/commands/import.d.ts +0 -3
- package/dist/commands/import.js +0 -123
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/info.d.ts +0 -75
- package/dist/commands/info.js +0 -362
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.js +0 -438
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -8
- package/dist/commands/integrations.js +0 -112
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/listen.d.ts +0 -17
- package/dist/commands/listen.js +0 -223
- package/dist/commands/listen.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -38
- package/dist/commands/mcp.js +0 -111
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -16
- package/dist/commands/migrate.js +0 -114
- package/dist/commands/migrate.js.map +0 -1
- package/dist/commands/move-origin.d.ts +0 -11
- package/dist/commands/move-origin.js +0 -95
- package/dist/commands/move-origin.js.map +0 -1
- package/dist/commands/operator.d.ts +0 -18
- package/dist/commands/operator.js +0 -238
- package/dist/commands/operator.js.map +0 -1
- package/dist/commands/orgs.d.ts +0 -4
- package/dist/commands/orgs.js +0 -72
- package/dist/commands/orgs.js.map +0 -1
- package/dist/commands/pages.d.ts +0 -14
- package/dist/commands/pages.js +0 -113
- package/dist/commands/pages.js.map +0 -1
- package/dist/commands/partner-platforms.d.ts +0 -10
- package/dist/commands/partner-platforms.js +0 -157
- package/dist/commands/partner-platforms.js.map +0 -1
- package/dist/commands/project-commands.d.ts +0 -38
- package/dist/commands/project-commands.js +0 -361
- package/dist/commands/project-commands.js.map +0 -1
- package/dist/commands/referrals.d.ts +0 -69
- package/dist/commands/referrals.js +0 -1056
- package/dist/commands/referrals.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -44
- package/dist/commands/resources.js +0 -234
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/sessions.d.ts +0 -4
- package/dist/commands/sessions.js +0 -28
- package/dist/commands/sessions.js.map +0 -1
- package/dist/commands/shared.d.ts +0 -38
- package/dist/commands/shared.js +0 -69
- package/dist/commands/shared.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.js +0 -77
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/users.d.ts +0 -4
- package/dist/commands/users.js +0 -100
- package/dist/commands/users.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -34
- package/dist/commands/webhooks.js +0 -301
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/config-http.d.ts +0 -29
- package/dist/config-http.js +0 -64
- package/dist/config-http.js.map +0 -1
- package/dist/config.d.ts +0 -64
- package/dist/config.js +0 -69
- package/dist/config.js.map +0 -1
- package/dist/context.d.ts +0 -72
- package/dist/context.js +0 -27
- package/dist/context.js.map +0 -1
- package/dist/define-config.d.ts +0 -9
- package/dist/define-config.js +0 -8
- package/dist/define-config.js.map +0 -1
- package/dist/errors.d.ts +0 -15
- package/dist/errors.js +0 -25
- package/dist/errors.js.map +0 -1
- package/dist/help.d.ts +0 -8
- package/dist/help.js +0 -868
- package/dist/help.js.map +0 -1
- package/dist/import/csv.d.ts +0 -6
- package/dist/import/csv.js +0 -63
- package/dist/import/csv.js.map +0 -1
- package/dist/import/vendors.d.ts +0 -57
- package/dist/import/vendors.js +0 -568
- package/dist/import/vendors.js.map +0 -1
- package/dist/index.d.ts +0 -33
- package/dist/index.js +0 -81
- package/dist/index.js.map +0 -1
- package/dist/io.d.ts +0 -21
- package/dist/io.js +0 -28
- package/dist/io.js.map +0 -1
- package/dist/migrate/appwrite/plugin.d.ts +0 -2
- package/dist/migrate/appwrite/plugin.js +0 -103
- package/dist/migrate/appwrite/plugin.js.map +0 -1
- package/dist/migrate/auth0/plugin.d.ts +0 -2
- package/dist/migrate/auth0/plugin.js +0 -126
- package/dist/migrate/auth0/plugin.js.map +0 -1
- package/dist/migrate/authentik/plugin.d.ts +0 -2
- package/dist/migrate/authentik/plugin.js +0 -135
- package/dist/migrate/authentik/plugin.js.map +0 -1
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +0 -8
- package/dist/migrate/azure-ad-b2c/plugin.js +0 -165
- package/dist/migrate/azure-ad-b2c/plugin.js.map +0 -1
- package/dist/migrate/better-auth/integration.d.ts +0 -59
- package/dist/migrate/better-auth/integration.js +0 -81
- package/dist/migrate/better-auth/integration.js.map +0 -1
- package/dist/migrate/better-auth/orchestrator.d.ts +0 -43
- package/dist/migrate/better-auth/orchestrator.js +0 -525
- package/dist/migrate/better-auth/orchestrator.js.map +0 -1
- package/dist/migrate/better-auth/output.d.ts +0 -20
- package/dist/migrate/better-auth/output.js +0 -146
- package/dist/migrate/better-auth/output.js.map +0 -1
- package/dist/migrate/better-auth/translate.d.ts +0 -77
- package/dist/migrate/better-auth/translate.js +0 -1989
- package/dist/migrate/better-auth/translate.js.map +0 -1
- package/dist/migrate/clerk/plugin.d.ts +0 -2
- package/dist/migrate/clerk/plugin.js +0 -76
- package/dist/migrate/clerk/plugin.js.map +0 -1
- package/dist/migrate/cognito/plugin.d.ts +0 -5
- package/dist/migrate/cognito/plugin.js +0 -170
- package/dist/migrate/cognito/plugin.js.map +0 -1
- package/dist/migrate/corbado/plugin.d.ts +0 -2
- package/dist/migrate/corbado/plugin.js +0 -63
- package/dist/migrate/corbado/plugin.js.map +0 -1
- package/dist/migrate/descope/plugin.d.ts +0 -2
- package/dist/migrate/descope/plugin.js +0 -83
- package/dist/migrate/descope/plugin.js.map +0 -1
- package/dist/migrate/entra-external-id/plugin.d.ts +0 -8
- package/dist/migrate/entra-external-id/plugin.js +0 -12
- package/dist/migrate/entra-external-id/plugin.js.map +0 -1
- package/dist/migrate/export/appwrite-config.d.ts +0 -28
- package/dist/migrate/export/appwrite-config.js +0 -170
- package/dist/migrate/export/appwrite-config.js.map +0 -1
- package/dist/migrate/export/appwrite.d.ts +0 -51
- package/dist/migrate/export/appwrite.js +0 -288
- package/dist/migrate/export/appwrite.js.map +0 -1
- package/dist/migrate/export/auth0-config.d.ts +0 -29
- package/dist/migrate/export/auth0-config.js +0 -249
- package/dist/migrate/export/auth0-config.js.map +0 -1
- package/dist/migrate/export/auth0.d.ts +0 -62
- package/dist/migrate/export/auth0.js +0 -575
- package/dist/migrate/export/auth0.js.map +0 -1
- package/dist/migrate/export/authentik-config.d.ts +0 -45
- package/dist/migrate/export/authentik-config.js +0 -357
- package/dist/migrate/export/authentik-config.js.map +0 -1
- package/dist/migrate/export/authentik.d.ts +0 -110
- package/dist/migrate/export/authentik.js +0 -838
- package/dist/migrate/export/authentik.js.map +0 -1
- package/dist/migrate/export/azure-config.d.ts +0 -58
- package/dist/migrate/export/azure-config.js +0 -344
- package/dist/migrate/export/azure-config.js.map +0 -1
- package/dist/migrate/export/azure.d.ts +0 -85
- package/dist/migrate/export/azure.js +0 -373
- package/dist/migrate/export/azure.js.map +0 -1
- package/dist/migrate/export/clerk-config.d.ts +0 -26
- package/dist/migrate/export/clerk-config.js +0 -227
- package/dist/migrate/export/clerk-config.js.map +0 -1
- package/dist/migrate/export/clerk.d.ts +0 -46
- package/dist/migrate/export/clerk.js +0 -486
- package/dist/migrate/export/clerk.js.map +0 -1
- package/dist/migrate/export/cognito-config.d.ts +0 -25
- package/dist/migrate/export/cognito-config.js +0 -273
- package/dist/migrate/export/cognito-config.js.map +0 -1
- package/dist/migrate/export/cognito.d.ts +0 -103
- package/dist/migrate/export/cognito.js +0 -441
- package/dist/migrate/export/cognito.js.map +0 -1
- package/dist/migrate/export/corbado-config.d.ts +0 -20
- package/dist/migrate/export/corbado-config.js +0 -63
- package/dist/migrate/export/corbado-config.js.map +0 -1
- package/dist/migrate/export/corbado.d.ts +0 -37
- package/dist/migrate/export/corbado.js +0 -132
- package/dist/migrate/export/corbado.js.map +0 -1
- package/dist/migrate/export/descope.d.ts +0 -35
- package/dist/migrate/export/descope.js +0 -208
- package/dist/migrate/export/descope.js.map +0 -1
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +0 -27
- package/dist/migrate/export/fake-vendor.test-helper.js +0 -41
- package/dist/migrate/export/fake-vendor.test-helper.js.map +0 -1
- package/dist/migrate/export/firebase-config.d.ts +0 -24
- package/dist/migrate/export/firebase-config.js +0 -215
- package/dist/migrate/export/firebase-config.js.map +0 -1
- package/dist/migrate/export/firebase.d.ts +0 -102
- package/dist/migrate/export/firebase.js +0 -464
- package/dist/migrate/export/firebase.js.map +0 -1
- package/dist/migrate/export/frameworks/app-users.d.ts +0 -42
- package/dist/migrate/export/frameworks/app-users.js +0 -161
- package/dist/migrate/export/frameworks/app-users.js.map +0 -1
- package/dist/migrate/export/frameworks/authjs.d.ts +0 -41
- package/dist/migrate/export/frameworks/authjs.js +0 -146
- package/dist/migrate/export/frameworks/authjs.js.map +0 -1
- package/dist/migrate/export/frameworks/devise.d.ts +0 -39
- package/dist/migrate/export/frameworks/devise.js +0 -218
- package/dist/migrate/export/frameworks/devise.js.map +0 -1
- package/dist/migrate/export/frameworks/django.d.ts +0 -45
- package/dist/migrate/export/frameworks/django.js +0 -315
- package/dist/migrate/export/frameworks/django.js.map +0 -1
- package/dist/migrate/export/frameworks/lucia.d.ts +0 -42
- package/dist/migrate/export/frameworks/lucia.js +0 -263
- package/dist/migrate/export/frameworks/lucia.js.map +0 -1
- package/dist/migrate/export/frameworks/tables.d.ts +0 -90
- package/dist/migrate/export/frameworks/tables.js +0 -325
- package/dist/migrate/export/frameworks/tables.js.map +0 -1
- package/dist/migrate/export/frameworks/webauthn.d.ts +0 -25
- package/dist/migrate/export/frameworks/webauthn.js +0 -130
- package/dist/migrate/export/frameworks/webauthn.js.map +0 -1
- package/dist/migrate/export/frontegg-config.d.ts +0 -29
- package/dist/migrate/export/frontegg-config.js +0 -238
- package/dist/migrate/export/frontegg-config.js.map +0 -1
- package/dist/migrate/export/frontegg.d.ts +0 -67
- package/dist/migrate/export/frontegg.js +0 -410
- package/dist/migrate/export/frontegg.js.map +0 -1
- package/dist/migrate/export/fusionauth-config.d.ts +0 -26
- package/dist/migrate/export/fusionauth-config.js +0 -226
- package/dist/migrate/export/fusionauth-config.js.map +0 -1
- package/dist/migrate/export/fusionauth.d.ts +0 -99
- package/dist/migrate/export/fusionauth.js +0 -642
- package/dist/migrate/export/fusionauth.js.map +0 -1
- package/dist/migrate/export/hanko-config.d.ts +0 -27
- package/dist/migrate/export/hanko-config.js +0 -265
- package/dist/migrate/export/hanko-config.js.map +0 -1
- package/dist/migrate/export/hanko.d.ts +0 -52
- package/dist/migrate/export/hanko.js +0 -605
- package/dist/migrate/export/hanko.js.map +0 -1
- package/dist/migrate/export/keycloak-config.d.ts +0 -19
- package/dist/migrate/export/keycloak-config.js +0 -219
- package/dist/migrate/export/keycloak-config.js.map +0 -1
- package/dist/migrate/export/keycloak.d.ts +0 -155
- package/dist/migrate/export/keycloak.js +0 -878
- package/dist/migrate/export/keycloak.js.map +0 -1
- package/dist/migrate/export/kinde-descope-config.d.ts +0 -38
- package/dist/migrate/export/kinde-descope-config.js +0 -172
- package/dist/migrate/export/kinde-descope-config.js.map +0 -1
- package/dist/migrate/export/kinde.d.ts +0 -57
- package/dist/migrate/export/kinde.js +0 -333
- package/dist/migrate/export/kinde.js.map +0 -1
- package/dist/migrate/export/ldap.d.ts +0 -53
- package/dist/migrate/export/ldap.js +0 -277
- package/dist/migrate/export/ldap.js.map +0 -1
- package/dist/migrate/export/logto-config.d.ts +0 -27
- package/dist/migrate/export/logto-config.js +0 -264
- package/dist/migrate/export/logto-config.js.map +0 -1
- package/dist/migrate/export/logto.d.ts +0 -150
- package/dist/migrate/export/logto.js +0 -809
- package/dist/migrate/export/logto.js.map +0 -1
- package/dist/migrate/export/magic-config.d.ts +0 -14
- package/dist/migrate/export/magic-config.js +0 -28
- package/dist/migrate/export/magic-config.js.map +0 -1
- package/dist/migrate/export/magic.d.ts +0 -31
- package/dist/migrate/export/magic.js +0 -93
- package/dist/migrate/export/magic.js.map +0 -1
- package/dist/migrate/export/mini-yaml.d.ts +0 -19
- package/dist/migrate/export/mini-yaml.js +0 -581
- package/dist/migrate/export/mini-yaml.js.map +0 -1
- package/dist/migrate/export/nhost-config.d.ts +0 -26
- package/dist/migrate/export/nhost-config.js +0 -360
- package/dist/migrate/export/nhost-config.js.map +0 -1
- package/dist/migrate/export/nhost.d.ts +0 -64
- package/dist/migrate/export/nhost.js +0 -304
- package/dist/migrate/export/nhost.js.map +0 -1
- package/dist/migrate/export/okta-config.d.ts +0 -30
- package/dist/migrate/export/okta-config.js +0 -205
- package/dist/migrate/export/okta-config.js.map +0 -1
- package/dist/migrate/export/okta.d.ts +0 -43
- package/dist/migrate/export/okta.js +0 -337
- package/dist/migrate/export/okta.js.map +0 -1
- package/dist/migrate/export/onelogin.d.ts +0 -22
- package/dist/migrate/export/onelogin.js +0 -123
- package/dist/migrate/export/onelogin.js.map +0 -1
- package/dist/migrate/export/ory-config.d.ts +0 -58
- package/dist/migrate/export/ory-config.js +0 -451
- package/dist/migrate/export/ory-config.js.map +0 -1
- package/dist/migrate/export/ory.d.ts +0 -81
- package/dist/migrate/export/ory.js +0 -555
- package/dist/migrate/export/ory.js.map +0 -1
- package/dist/migrate/export/password-detect.d.ts +0 -29
- package/dist/migrate/export/password-detect.js +0 -81
- package/dist/migrate/export/password-detect.js.map +0 -1
- package/dist/migrate/export/pingone.d.ts +0 -36
- package/dist/migrate/export/pingone.js +0 -218
- package/dist/migrate/export/pingone.js.map +0 -1
- package/dist/migrate/export/plugin-kit.d.ts +0 -25
- package/dist/migrate/export/plugin-kit.js +0 -82
- package/dist/migrate/export/plugin-kit.js.map +0 -1
- package/dist/migrate/export/pocketbase-config.d.ts +0 -28
- package/dist/migrate/export/pocketbase-config.js +0 -180
- package/dist/migrate/export/pocketbase-config.js.map +0 -1
- package/dist/migrate/export/pocketbase.d.ts +0 -52
- package/dist/migrate/export/pocketbase.js +0 -243
- package/dist/migrate/export/pocketbase.js.map +0 -1
- package/dist/migrate/export/project-files.d.ts +0 -15
- package/dist/migrate/export/project-files.js +0 -43
- package/dist/migrate/export/project-files.js.map +0 -1
- package/dist/migrate/export/propelauth-config.d.ts +0 -18
- package/dist/migrate/export/propelauth-config.js +0 -58
- package/dist/migrate/export/propelauth-config.js.map +0 -1
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +0 -62
- package/dist/migrate/export/propelauth-harness.test-helper.js +0 -109
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +0 -1
- package/dist/migrate/export/propelauth.d.ts +0 -48
- package/dist/migrate/export/propelauth.js +0 -255
- package/dist/migrate/export/propelauth.js.map +0 -1
- package/dist/migrate/export/record-set.d.ts +0 -44
- package/dist/migrate/export/record-set.js +0 -98
- package/dist/migrate/export/record-set.js.map +0 -1
- package/dist/migrate/export/source-lines.d.ts +0 -17
- package/dist/migrate/export/source-lines.js +0 -43
- package/dist/migrate/export/source-lines.js.map +0 -1
- package/dist/migrate/export/sso-metadata.d.ts +0 -47
- package/dist/migrate/export/sso-metadata.js +0 -180
- package/dist/migrate/export/sso-metadata.js.map +0 -1
- package/dist/migrate/export/stytch-config.d.ts +0 -22
- package/dist/migrate/export/stytch-config.js +0 -102
- package/dist/migrate/export/stytch-config.js.map +0 -1
- package/dist/migrate/export/stytch.d.ts +0 -68
- package/dist/migrate/export/stytch.js +0 -510
- package/dist/migrate/export/stytch.js.map +0 -1
- package/dist/migrate/export/supabase-config.d.ts +0 -48
- package/dist/migrate/export/supabase-config.js +0 -408
- package/dist/migrate/export/supabase-config.js.map +0 -1
- package/dist/migrate/export/supabase.d.ts +0 -86
- package/dist/migrate/export/supabase.js +0 -524
- package/dist/migrate/export/supabase.js.map +0 -1
- package/dist/migrate/export/supertokens-config.d.ts +0 -20
- package/dist/migrate/export/supertokens-config.js +0 -150
- package/dist/migrate/export/supertokens-config.js.map +0 -1
- package/dist/migrate/export/supertokens.d.ts +0 -125
- package/dist/migrate/export/supertokens.js +0 -464
- package/dist/migrate/export/supertokens.js.map +0 -1
- package/dist/migrate/export/table.d.ts +0 -35
- package/dist/migrate/export/table.js +0 -248
- package/dist/migrate/export/table.js.map +0 -1
- package/dist/migrate/export/translate-kit.d.ts +0 -46
- package/dist/migrate/export/translate-kit.js +0 -148
- package/dist/migrate/export/translate-kit.js.map +0 -1
- package/dist/migrate/export/userfront-config.d.ts +0 -15
- package/dist/migrate/export/userfront-config.js +0 -49
- package/dist/migrate/export/userfront-config.js.map +0 -1
- package/dist/migrate/export/userfront.d.ts +0 -38
- package/dist/migrate/export/userfront.js +0 -189
- package/dist/migrate/export/userfront.js.map +0 -1
- package/dist/migrate/export/vendor-http.d.ts +0 -46
- package/dist/migrate/export/vendor-http.js +0 -138
- package/dist/migrate/export/vendor-http.js.map +0 -1
- package/dist/migrate/export/workos-config.d.ts +0 -23
- package/dist/migrate/export/workos-config.js +0 -125
- package/dist/migrate/export/workos-config.js.map +0 -1
- package/dist/migrate/export/workos.d.ts +0 -46
- package/dist/migrate/export/workos.js +0 -272
- package/dist/migrate/export/workos.js.map +0 -1
- package/dist/migrate/export/zip.d.ts +0 -8
- package/dist/migrate/export/zip.js +0 -66
- package/dist/migrate/export/zip.js.map +0 -1
- package/dist/migrate/export/zitadel-config.d.ts +0 -37
- package/dist/migrate/export/zitadel-config.js +0 -279
- package/dist/migrate/export/zitadel-config.js.map +0 -1
- package/dist/migrate/export/zitadel.d.ts +0 -82
- package/dist/migrate/export/zitadel.js +0 -447
- package/dist/migrate/export/zitadel.js.map +0 -1
- package/dist/migrate/firebase/plugin.d.ts +0 -2
- package/dist/migrate/firebase/plugin.js +0 -152
- package/dist/migrate/firebase/plugin.js.map +0 -1
- package/dist/migrate/framework/builtins.d.ts +0 -2
- package/dist/migrate/framework/builtins.js +0 -52
- package/dist/migrate/framework/builtins.js.map +0 -1
- package/dist/migrate/framework/commands.d.ts +0 -20
- package/dist/migrate/framework/commands.js +0 -58
- package/dist/migrate/framework/commands.js.map +0 -1
- package/dist/migrate/framework/custom.d.ts +0 -12
- package/dist/migrate/framework/custom.js +0 -96
- package/dist/migrate/framework/custom.js.map +0 -1
- package/dist/migrate/framework/orchestrator.d.ts +0 -113
- package/dist/migrate/framework/orchestrator.js +0 -532
- package/dist/migrate/framework/orchestrator.js.map +0 -1
- package/dist/migrate/framework/plugin.d.ts +0 -167
- package/dist/migrate/framework/plugin.js +0 -3
- package/dist/migrate/framework/plugin.js.map +0 -1
- package/dist/migrate/framework/registry.d.ts +0 -11
- package/dist/migrate/framework/registry.js +0 -44
- package/dist/migrate/framework/registry.js.map +0 -1
- package/dist/migrate/framework/report.d.ts +0 -17
- package/dist/migrate/framework/report.js +0 -103
- package/dist/migrate/framework/report.js.map +0 -1
- package/dist/migrate/frameworks/plugins.d.ts +0 -29
- package/dist/migrate/frameworks/plugins.js +0 -402
- package/dist/migrate/frameworks/plugins.js.map +0 -1
- package/dist/migrate/frameworks/report.d.ts +0 -92
- package/dist/migrate/frameworks/report.js +0 -207
- package/dist/migrate/frameworks/report.js.map +0 -1
- package/dist/migrate/frameworks/translate-js.d.ts +0 -5
- package/dist/migrate/frameworks/translate-js.js +0 -503
- package/dist/migrate/frameworks/translate-js.js.map +0 -1
- package/dist/migrate/frameworks/translate-rails-django.d.ts +0 -3
- package/dist/migrate/frameworks/translate-rails-django.js +0 -1391
- package/dist/migrate/frameworks/translate-rails-django.js.map +0 -1
- package/dist/migrate/frontegg/plugin.d.ts +0 -2
- package/dist/migrate/frontegg/plugin.js +0 -78
- package/dist/migrate/frontegg/plugin.js.map +0 -1
- package/dist/migrate/fusionauth/plugin.d.ts +0 -2
- package/dist/migrate/fusionauth/plugin.js +0 -109
- package/dist/migrate/fusionauth/plugin.js.map +0 -1
- package/dist/migrate/hanko/plugin.d.ts +0 -2
- package/dist/migrate/hanko/plugin.js +0 -100
- package/dist/migrate/hanko/plugin.js.map +0 -1
- package/dist/migrate/keycloak/plugin.d.ts +0 -2
- package/dist/migrate/keycloak/plugin.js +0 -148
- package/dist/migrate/keycloak/plugin.js.map +0 -1
- package/dist/migrate/kinde/plugin.d.ts +0 -2
- package/dist/migrate/kinde/plugin.js +0 -105
- package/dist/migrate/kinde/plugin.js.map +0 -1
- package/dist/migrate/ldap/plugin.d.ts +0 -2
- package/dist/migrate/ldap/plugin.js +0 -73
- package/dist/migrate/ldap/plugin.js.map +0 -1
- package/dist/migrate/logto/plugin.d.ts +0 -2
- package/dist/migrate/logto/plugin.js +0 -131
- package/dist/migrate/logto/plugin.js.map +0 -1
- package/dist/migrate/magic/plugin.d.ts +0 -2
- package/dist/migrate/magic/plugin.js +0 -56
- package/dist/migrate/magic/plugin.js.map +0 -1
- package/dist/migrate/nhost/plugin.d.ts +0 -2
- package/dist/migrate/nhost/plugin.js +0 -115
- package/dist/migrate/nhost/plugin.js.map +0 -1
- package/dist/migrate/oidc/plugin.d.ts +0 -2
- package/dist/migrate/oidc/plugin.js +0 -73
- package/dist/migrate/oidc/plugin.js.map +0 -1
- package/dist/migrate/okta/plugin.d.ts +0 -2
- package/dist/migrate/okta/plugin.js +0 -105
- package/dist/migrate/okta/plugin.js.map +0 -1
- package/dist/migrate/onelogin/plugin.d.ts +0 -2
- package/dist/migrate/onelogin/plugin.js +0 -61
- package/dist/migrate/onelogin/plugin.js.map +0 -1
- package/dist/migrate/ory/plugin.d.ts +0 -2
- package/dist/migrate/ory/plugin.js +0 -186
- package/dist/migrate/ory/plugin.js.map +0 -1
- package/dist/migrate/ping-identity/plugin.d.ts +0 -2
- package/dist/migrate/ping-identity/plugin.js +0 -100
- package/dist/migrate/ping-identity/plugin.js.map +0 -1
- package/dist/migrate/pocketbase/plugin.d.ts +0 -2
- package/dist/migrate/pocketbase/plugin.js +0 -99
- package/dist/migrate/pocketbase/plugin.js.map +0 -1
- package/dist/migrate/propelauth/plugin.d.ts +0 -2
- package/dist/migrate/propelauth/plugin.js +0 -65
- package/dist/migrate/propelauth/plugin.js.map +0 -1
- package/dist/migrate/saml/plugin.d.ts +0 -2
- package/dist/migrate/saml/plugin.js +0 -79
- package/dist/migrate/saml/plugin.js.map +0 -1
- package/dist/migrate/stytch/plugin.d.ts +0 -2
- package/dist/migrate/stytch/plugin.js +0 -97
- package/dist/migrate/stytch/plugin.js.map +0 -1
- package/dist/migrate/supabase/plugin.d.ts +0 -2
- package/dist/migrate/supabase/plugin.js +0 -149
- package/dist/migrate/supabase/plugin.js.map +0 -1
- package/dist/migrate/supertokens/plugin.d.ts +0 -2
- package/dist/migrate/supertokens/plugin.js +0 -114
- package/dist/migrate/supertokens/plugin.js.map +0 -1
- package/dist/migrate/user-table/plugin.d.ts +0 -2
- package/dist/migrate/user-table/plugin.js +0 -62
- package/dist/migrate/user-table/plugin.js.map +0 -1
- package/dist/migrate/userfront/plugin.d.ts +0 -2
- package/dist/migrate/userfront/plugin.js +0 -60
- package/dist/migrate/userfront/plugin.js.map +0 -1
- package/dist/migrate/workos/plugin.d.ts +0 -2
- package/dist/migrate/workos/plugin.js +0 -81
- package/dist/migrate/workos/plugin.js.map +0 -1
- package/dist/migrate/zitadel/plugin.d.ts +0 -2
- package/dist/migrate/zitadel/plugin.js +0 -114
- package/dist/migrate/zitadel/plugin.js.map +0 -1
- package/dist/output.d.ts +0 -41
- package/dist/output.js +0 -72
- package/dist/output.js.map +0 -1
- package/dist/project.d.ts +0 -64
- package/dist/project.js +0 -86
- package/dist/project.js.map +0 -1
- package/dist/prompt.d.ts +0 -15
- package/dist/prompt.js +0 -46
- package/dist/prompt.js.map +0 -1
- package/dist/run.d.ts +0 -12
- package/dist/run.js +0 -157
- package/dist/run.js.map +0 -1
- package/dist/secrets.d.ts +0 -41
- package/dist/secrets.js +0 -142
- package/dist/secrets.js.map +0 -1
- package/dist/serialize.d.ts +0 -30
- package/dist/serialize.js +0 -131
- package/dist/serialize.js.map +0 -1
- package/dist/version.d.ts +0 -7
- package/dist/version.js +0 -21
- package/dist/version.js.map +0 -1
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CognitoApi = void 0;
|
|
4
|
-
exports.regionOfPool = regionOfPool;
|
|
5
|
-
exports.amzDate = amzDate;
|
|
6
|
-
exports.sigV4Key = sigV4Key;
|
|
7
|
-
exports.signAwsRequest = signAwsRequest;
|
|
8
|
-
exports.attributesOf = attributesOf;
|
|
9
|
-
exports.parseIdentities = parseIdentities;
|
|
10
|
-
exports.mapCognitoUser = mapCognitoUser;
|
|
11
|
-
exports.cognitoIdentities = cognitoIdentities;
|
|
12
|
-
exports.cognitoFactors = cognitoFactors;
|
|
13
|
-
exports.parseListUsersOutput = parseListUsersOutput;
|
|
14
|
-
exports.cognitoSsoConnection = cognitoSsoConnection;
|
|
15
|
-
exports.exportCognito = exportCognito;
|
|
16
|
-
const node_crypto_1 = require("node:crypto");
|
|
17
|
-
const record_set_1 = require("./record-set");
|
|
18
|
-
const translate_kit_1 = require("./translate-kit");
|
|
19
|
-
const vendor_http_1 = require("./vendor-http");
|
|
20
|
-
const POOL_ID = /^([a-z]{2}(?:-[a-z]+)+-\d)_[0-9A-Za-z]+$/;
|
|
21
|
-
/** The region of a user pool id (`us-east-1_AbC123` → `us-east-1`), or undefined. */
|
|
22
|
-
function regionOfPool(poolId) {
|
|
23
|
-
return POOL_ID.exec(poolId.trim())?.[1];
|
|
24
|
-
}
|
|
25
|
-
// ── AWS Signature Version 4 ─────────────────────────────────────────────────
|
|
26
|
-
const sha256Hex = (data) => (0, node_crypto_1.createHash)('sha256').update(data).digest('hex');
|
|
27
|
-
const hmac = (key, data) => (0, node_crypto_1.createHmac)('sha256', key).update(data, 'utf8').digest();
|
|
28
|
-
/** `20150830T123600Z`. */
|
|
29
|
-
function amzDate(d) {
|
|
30
|
-
return d.toISOString().replace(/[-:]/g, '').replace(/\.\d{3}/, '');
|
|
31
|
-
}
|
|
32
|
-
/** The SigV4 signing key: HMAC chain over date, region, service. */
|
|
33
|
-
function sigV4Key(secret, date, region, service) {
|
|
34
|
-
return hmac(hmac(hmac(hmac(`AWS4${secret}`, date), region), service), 'aws4_request');
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Sign a request with AWS Signature Version 4 (header form). `headers` must
|
|
38
|
-
* not yet carry `authorization`; the result adds `host`, `x-amz-date`, the
|
|
39
|
-
* session token when there is one, and `authorization`. Only a path without
|
|
40
|
-
* a query string is signed (every Cognito call is `POST /`).
|
|
41
|
-
*/
|
|
42
|
-
function signAwsRequest(o) {
|
|
43
|
-
const url = new URL(o.url);
|
|
44
|
-
const stamp = amzDate(o.now);
|
|
45
|
-
const date = stamp.slice(0, 8);
|
|
46
|
-
const headers = {};
|
|
47
|
-
for (const [k, v] of Object.entries(o.headers))
|
|
48
|
-
headers[k.toLowerCase()] = v;
|
|
49
|
-
headers.host = url.host;
|
|
50
|
-
headers['x-amz-date'] = stamp;
|
|
51
|
-
if (o.credentials.sessionToken)
|
|
52
|
-
headers['x-amz-security-token'] = o.credentials.sessionToken;
|
|
53
|
-
const names = Object.keys(headers).sort();
|
|
54
|
-
const canonicalHeaders = names.map((n) => `${n}:${headers[n].trim().replace(/\s+/g, ' ')}\n`).join('');
|
|
55
|
-
const signedHeaders = names.join(';');
|
|
56
|
-
const canonical = [o.method.toUpperCase(), url.pathname || '/', url.search.slice(1), canonicalHeaders, signedHeaders, sha256Hex(o.body)].join('\n');
|
|
57
|
-
const scope = `${date}/${o.region}/${o.service}/aws4_request`;
|
|
58
|
-
const toSign = ['AWS4-HMAC-SHA256', stamp, scope, sha256Hex(canonical)].join('\n');
|
|
59
|
-
const signature = (0, node_crypto_1.createHmac)('sha256', sigV4Key(o.credentials.secretAccessKey, date, o.region, o.service)).update(toSign, 'utf8').digest('hex');
|
|
60
|
-
headers.authorization = `AWS4-HMAC-SHA256 Credential=${o.credentials.accessKeyId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`;
|
|
61
|
-
return headers;
|
|
62
|
-
}
|
|
63
|
-
// ── the cognito-idp JSON API ────────────────────────────────────────────────
|
|
64
|
-
const RETRYABLE = new Set(['TooManyRequestsException', 'LimitExceededException', 'InternalErrorException', 'ThrottlingException']);
|
|
65
|
-
class CognitoApi {
|
|
66
|
-
o;
|
|
67
|
-
endpoint;
|
|
68
|
-
constructor(o) {
|
|
69
|
-
this.o = o;
|
|
70
|
-
this.endpoint = `https://cognito-idp.${o.region}.amazonaws.com/`;
|
|
71
|
-
}
|
|
72
|
-
/** One API call (`ListUsers`, `DescribeUserPool` …). Throttling and 5xx are retried. */
|
|
73
|
-
async call(action, input) {
|
|
74
|
-
const fetchImpl = this.o.fetchImpl ?? fetch;
|
|
75
|
-
const sleep = this.o.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
76
|
-
const attempts = Math.max(1, this.o.attempts ?? 6);
|
|
77
|
-
const body = JSON.stringify(input);
|
|
78
|
-
for (let attempt = 1;; attempt++) {
|
|
79
|
-
const headers = signAwsRequest({
|
|
80
|
-
method: 'POST',
|
|
81
|
-
url: this.endpoint,
|
|
82
|
-
headers: { 'content-type': 'application/x-amz-json-1.1', 'x-amz-target': `AWSCognitoIdentityProviderService.${action}` },
|
|
83
|
-
body,
|
|
84
|
-
region: this.o.region,
|
|
85
|
-
service: 'cognito-idp',
|
|
86
|
-
credentials: this.o.credentials,
|
|
87
|
-
now: (this.o.now ?? (() => new Date()))(),
|
|
88
|
-
});
|
|
89
|
-
delete headers.host; // fetch sets it (and refuses a manual one)
|
|
90
|
-
let res;
|
|
91
|
-
try {
|
|
92
|
-
res = await fetchImpl(this.endpoint, { method: 'POST', headers, body });
|
|
93
|
-
}
|
|
94
|
-
catch (err) {
|
|
95
|
-
if (attempt < attempts) {
|
|
96
|
-
await sleep(backoff(attempt));
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
throw new vendor_http_1.VendorApiError('Cognito', 0, action, err instanceof Error ? err.message : String(err));
|
|
100
|
-
}
|
|
101
|
-
const text = await res.text();
|
|
102
|
-
let parsed = {};
|
|
103
|
-
try {
|
|
104
|
-
parsed = text ? JSON.parse(text) : {};
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
parsed = { message: text.slice(0, 200) };
|
|
108
|
-
}
|
|
109
|
-
if (res.ok)
|
|
110
|
-
return parsed;
|
|
111
|
-
const o = (0, record_set_1.isObj)(parsed) ? parsed : {};
|
|
112
|
-
const type = ((0, record_set_1.str)(o.__type) ?? '').split('#').pop() ?? '';
|
|
113
|
-
if ((res.status >= 500 || RETRYABLE.has(type)) && attempt < attempts) {
|
|
114
|
-
await sleep(backoff(attempt));
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
throw new vendor_http_1.VendorApiError('Cognito', res.status, action, [type, (0, record_set_1.str)(o.message) ?? (0, record_set_1.str)(o.Message)].filter(Boolean).join(': '));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/** Every page of a token-paged list. */
|
|
121
|
-
async all(action, input, listKey, tokenKey) {
|
|
122
|
-
const out = [];
|
|
123
|
-
let token;
|
|
124
|
-
do {
|
|
125
|
-
const page = await this.call(action, { ...input, ...(token ? { [tokenKey]: token } : {}) });
|
|
126
|
-
out.push(...(0, record_set_1.objs)(page[listKey]));
|
|
127
|
-
token = (0, record_set_1.str)(page[tokenKey]);
|
|
128
|
-
} while (token);
|
|
129
|
-
return out;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.CognitoApi = CognitoApi;
|
|
133
|
-
function backoff(attempt) {
|
|
134
|
-
return Math.min(250 * 2 ** (attempt - 1), 20_000);
|
|
135
|
-
}
|
|
136
|
-
// ── mapping ─────────────────────────────────────────────────────────────────
|
|
137
|
-
/** Attributes the user record carries itself (the rest of the standard ones go to private metadata). */
|
|
138
|
-
const MAPPED = new Set(['sub', 'email', 'email_verified', 'phone_number', 'phone_number_verified', 'given_name', 'family_name', 'name', 'picture', 'preferred_username', 'identities']);
|
|
139
|
-
/** Cognito provider names → the provider an identity record carries. */
|
|
140
|
-
const SOCIAL = { Google: 'google', Facebook: 'facebook', SignInWithApple: 'apple', LoginWithAmazon: 'amazon' };
|
|
141
|
-
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
142
|
-
function attributesOf(u) {
|
|
143
|
-
const out = {};
|
|
144
|
-
// ListUsers says Attributes, AdminGetUser says UserAttributes.
|
|
145
|
-
for (const a of [...(0, record_set_1.objs)(u.Attributes), ...(0, record_set_1.objs)(u.UserAttributes)]) {
|
|
146
|
-
const name = (0, record_set_1.str)(a.Name);
|
|
147
|
-
if (name && typeof a.Value === 'string')
|
|
148
|
-
out[name] = a.Value;
|
|
149
|
-
}
|
|
150
|
-
return out;
|
|
151
|
-
}
|
|
152
|
-
/** Epoch seconds (the API) or an ISO string (the AWS CLI) → a bundle timestamp. */
|
|
153
|
-
function cognitoTime(v) {
|
|
154
|
-
if (typeof v === 'number' && Number.isFinite(v))
|
|
155
|
-
return Math.round(v * 1000);
|
|
156
|
-
return (0, record_set_1.str)(v);
|
|
157
|
-
}
|
|
158
|
-
/** The `identities` attribute (a JSON string; `primary` / `dateCreated` typed loosely). */
|
|
159
|
-
function parseIdentities(raw) {
|
|
160
|
-
if (!raw)
|
|
161
|
-
return [];
|
|
162
|
-
try {
|
|
163
|
-
const parsed = JSON.parse(raw);
|
|
164
|
-
return (0, record_set_1.objs)(parsed);
|
|
165
|
-
}
|
|
166
|
-
catch {
|
|
167
|
-
return [];
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/** Map one Cognito UserType onto a user record (null when it has no sub or no identifier). */
|
|
171
|
-
function mapCognitoUser(u) {
|
|
172
|
-
const a = attributesOf(u);
|
|
173
|
-
const sub = (0, record_set_1.str)(a.sub);
|
|
174
|
-
if (!sub)
|
|
175
|
-
return null;
|
|
176
|
-
const cognitoUsername = (0, record_set_1.str)(u.Username);
|
|
177
|
-
const federated = (0, record_set_1.str)(u.UserStatus) === 'EXTERNAL_PROVIDER';
|
|
178
|
-
const email = (0, record_set_1.str)(a.email)?.toLowerCase();
|
|
179
|
-
const phone = (0, record_set_1.e164)(a.phone_number);
|
|
180
|
-
// A username Cognito users typed (not the generated sub / UUID, an email or a federated `Google_…` id).
|
|
181
|
-
const typed = cognitoUsername && !UUID.test(cognitoUsername) && !cognitoUsername.includes('@') && !federated && !/^\+\d+$/.test(cognitoUsername) ? cognitoUsername : undefined;
|
|
182
|
-
const username = (0, record_set_1.str)(a.preferred_username) ?? typed;
|
|
183
|
-
const custom = {};
|
|
184
|
-
const standard = {};
|
|
185
|
-
for (const [k, v] of Object.entries(a)) {
|
|
186
|
-
if (k.startsWith('custom:'))
|
|
187
|
-
custom[k.slice(7)] = v;
|
|
188
|
-
else if (k.startsWith('dev:'))
|
|
189
|
-
continue;
|
|
190
|
-
else if (!MAPPED.has(k))
|
|
191
|
-
standard[k] = v;
|
|
192
|
-
}
|
|
193
|
-
const user = (0, record_set_1.compact)({
|
|
194
|
-
id: sub,
|
|
195
|
-
emails: email ? [{ email, verified: a.email_verified === 'true', primary: true }] : undefined,
|
|
196
|
-
phones: phone ? [{ phone, verified: a.phone_number_verified === 'true', primary: !email }] : undefined,
|
|
197
|
-
username,
|
|
198
|
-
first_name: (0, record_set_1.str)(a.given_name),
|
|
199
|
-
last_name: (0, record_set_1.str)(a.family_name),
|
|
200
|
-
name: (0, record_set_1.str)(a.name),
|
|
201
|
-
image_url: (0, record_set_1.str)(a.picture),
|
|
202
|
-
banned: u.Enabled === false ? true : undefined,
|
|
203
|
-
public_metadata: Object.keys(custom).length ? custom : undefined,
|
|
204
|
-
private_metadata: (0, record_set_1.compact)({ cognito_username: cognitoUsername, cognito_status: (0, record_set_1.str)(u.UserStatus), cognito_attributes: Object.keys(standard).length ? standard : undefined }),
|
|
205
|
-
created_at: cognitoTime(u.UserCreateDate),
|
|
206
|
-
});
|
|
207
|
-
if (!user.emails && !user.phones && !user.username) {
|
|
208
|
-
// A pool keyed on a bare username nobody typed (federated users without an email): keep the Cognito username.
|
|
209
|
-
if (!cognitoUsername)
|
|
210
|
-
return null;
|
|
211
|
-
user.username = cognitoUsername;
|
|
212
|
-
}
|
|
213
|
-
return user;
|
|
214
|
-
}
|
|
215
|
-
/** The identity records of one user's `identities` attribute. */
|
|
216
|
-
function cognitoIdentities(userId, raw) {
|
|
217
|
-
const out = [];
|
|
218
|
-
for (const i of parseIdentities(raw)) {
|
|
219
|
-
const providerName = (0, record_set_1.str)(i.providerName);
|
|
220
|
-
const providerUserId = (0, record_set_1.str)(i.userId);
|
|
221
|
-
if (!providerName || !providerUserId)
|
|
222
|
-
continue;
|
|
223
|
-
const type = (0, record_set_1.str)(i.providerType) ?? providerName;
|
|
224
|
-
const kind = type === 'SAML' ? 'saml' : type === 'OIDC' ? 'oidc' : 'oauth';
|
|
225
|
-
out.push((0, record_set_1.compact)({
|
|
226
|
-
user_id: userId,
|
|
227
|
-
provider: SOCIAL[providerName] ?? providerName,
|
|
228
|
-
provider_user_id: providerUserId,
|
|
229
|
-
kind: kind,
|
|
230
|
-
sso_connection_id: kind === 'saml' || kind === 'oidc' ? providerName : undefined,
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
return out;
|
|
234
|
-
}
|
|
235
|
-
/** SMS / email factors from legacy MFAOptions or a UserMFASettingList. */
|
|
236
|
-
function cognitoFactors(userId, u, attrs) {
|
|
237
|
-
const settings = new Set((0, record_set_1.strs)(u.UserMFASettingList));
|
|
238
|
-
for (const o of (0, record_set_1.objs)(u.MFAOptions))
|
|
239
|
-
if ((0, record_set_1.str)(o.DeliveryMedium) === 'SMS')
|
|
240
|
-
settings.add('SMS_MFA');
|
|
241
|
-
const factors = [];
|
|
242
|
-
const phone = (0, record_set_1.e164)(attrs.phone_number);
|
|
243
|
-
if (settings.has('SMS_MFA') && phone)
|
|
244
|
-
factors.push({ user_id: userId, type: 'phone', phone, verified: true });
|
|
245
|
-
if (settings.has('EMAIL_OTP') && attrs.email)
|
|
246
|
-
factors.push({ user_id: userId, type: 'email', verified: true });
|
|
247
|
-
return { factors, totp: settings.has('SOFTWARE_TOKEN_MFA') };
|
|
248
|
-
}
|
|
249
|
-
/** The users of `aws cognito-idp list-users` output (`{ "Users": [...] }`, or a bare array). */
|
|
250
|
-
function parseListUsersOutput(text) {
|
|
251
|
-
let parsed;
|
|
252
|
-
try {
|
|
253
|
-
parsed = JSON.parse(text);
|
|
254
|
-
}
|
|
255
|
-
catch {
|
|
256
|
-
throw new Error('The users file is not `aws cognito-idp list-users --output json` output.');
|
|
257
|
-
}
|
|
258
|
-
if (Array.isArray(parsed))
|
|
259
|
-
return (0, record_set_1.objs)(parsed);
|
|
260
|
-
if ((0, record_set_1.isObj)(parsed) && Array.isArray(parsed.Users))
|
|
261
|
-
return (0, record_set_1.objs)(parsed.Users);
|
|
262
|
-
throw new Error('The users file has no "Users" list (expected `aws cognito-idp list-users --output json` output).');
|
|
263
|
-
}
|
|
264
|
-
/** A SAML / OIDC identity provider → an SSO connection record (social providers are null). */
|
|
265
|
-
function cognitoSsoConnection(idp) {
|
|
266
|
-
const name = (0, record_set_1.str)(idp.ProviderName);
|
|
267
|
-
const type = (0, record_set_1.str)(idp.ProviderType);
|
|
268
|
-
if (!name || (type !== 'SAML' && type !== 'OIDC'))
|
|
269
|
-
return null;
|
|
270
|
-
const d = (0, record_set_1.isObj)(idp.ProviderDetails) ? idp.ProviderDetails : {};
|
|
271
|
-
const mapping = {};
|
|
272
|
-
if ((0, record_set_1.isObj)(idp.AttributeMapping))
|
|
273
|
-
for (const [k, v] of Object.entries(idp.AttributeMapping))
|
|
274
|
-
if (typeof v === 'string')
|
|
275
|
-
mapping[k] = v;
|
|
276
|
-
const domains = (0, record_set_1.strs)(idp.IdpIdentifiers).filter((x) => /^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(x));
|
|
277
|
-
if (type === 'SAML') {
|
|
278
|
-
return (0, record_set_1.compact)({
|
|
279
|
-
id: name,
|
|
280
|
-
name,
|
|
281
|
-
protocol: 'saml',
|
|
282
|
-
domains,
|
|
283
|
-
saml: (0, record_set_1.compact)({ idp_metadata_url: (0, record_set_1.str)(d.MetadataURL), idp_metadata_xml: (0, record_set_1.str)(d.MetadataFile), attribute_mapping: Object.keys(mapping).length ? mapping : undefined }),
|
|
284
|
-
enabled: true,
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
const issuer = (0, record_set_1.str)(d.oidc_issuer);
|
|
288
|
-
return (0, record_set_1.compact)({
|
|
289
|
-
id: name,
|
|
290
|
-
name,
|
|
291
|
-
protocol: 'oidc',
|
|
292
|
-
domains,
|
|
293
|
-
oidc: (0, record_set_1.compact)({
|
|
294
|
-
issuer,
|
|
295
|
-
discovery_url: issuer ? `${issuer.replace(/\/+$/, '')}/.well-known/openid-configuration` : undefined,
|
|
296
|
-
client_id: (0, record_set_1.str)(d.client_id),
|
|
297
|
-
client_secret: (0, record_set_1.str)(d.client_secret),
|
|
298
|
-
scopes: (0, record_set_1.str)(d.authorize_scopes)?.split(/[\s,]+/).filter(Boolean),
|
|
299
|
-
}),
|
|
300
|
-
enabled: true,
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
// ── the export ──────────────────────────────────────────────────────────────
|
|
304
|
-
async function exportCognito(opts) {
|
|
305
|
-
const set = new record_set_1.RecordSet();
|
|
306
|
-
const poolId = opts.userPoolId.trim();
|
|
307
|
-
const region = opts.region ?? regionOfPool(poolId);
|
|
308
|
-
if (!region)
|
|
309
|
-
throw new Error(`Not a Cognito user pool id: ${opts.userPoolId} (expected <region>_<id>, e.g. us-east-1_AbC123xyz).`);
|
|
310
|
-
if (!opts.usersText && !opts.credentials)
|
|
311
|
-
throw new Error('Cognito export needs AWS credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY) or a list-users output file.');
|
|
312
|
-
const progress = opts.onProgress ?? (() => undefined);
|
|
313
|
-
const api = opts.credentials ? new CognitoApi({ region, credentials: opts.credentials, fetchImpl: opts.fetchImpl, sleep: opts.sleep, now: opts.now }) : undefined;
|
|
314
|
-
set.manifest.origin = `Cognito user pool ${poolId}`;
|
|
315
|
-
// Groups → app roles.
|
|
316
|
-
const groupKeys = new Map();
|
|
317
|
-
if (api && opts.groups !== 'skip') {
|
|
318
|
-
progress('groups');
|
|
319
|
-
for (const g of await api.all('ListGroups', { UserPoolId: poolId, Limit: 60 }, 'Groups', 'NextToken')) {
|
|
320
|
-
const name = (0, record_set_1.str)(g.GroupName);
|
|
321
|
-
if (!name)
|
|
322
|
-
continue;
|
|
323
|
-
const key = (0, translate_kit_1.keyOf)(name);
|
|
324
|
-
groupKeys.set(name, key);
|
|
325
|
-
set.add('role', (0, record_set_1.compact)({ key, name, description: (0, record_set_1.str)(g.Description), scope: 'app' }), key);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
// Identity providers → SSO connections.
|
|
329
|
-
const providers = new Set();
|
|
330
|
-
if (api) {
|
|
331
|
-
progress('identity providers');
|
|
332
|
-
let idps = [];
|
|
333
|
-
try {
|
|
334
|
-
idps = await api.all('ListIdentityProviders', { UserPoolId: poolId, MaxResults: 60 }, 'Providers', 'NextToken');
|
|
335
|
-
}
|
|
336
|
-
catch (err) {
|
|
337
|
-
if (!(err instanceof vendor_http_1.VendorApiError && (err.status === 400 || err.status === 403)))
|
|
338
|
-
throw err;
|
|
339
|
-
set.warn(`Could not list identity providers (${err.message}); enterprise connections were not exported.`);
|
|
340
|
-
}
|
|
341
|
-
for (const summary of idps) {
|
|
342
|
-
const name = (0, record_set_1.str)(summary.ProviderName);
|
|
343
|
-
if (!name)
|
|
344
|
-
continue;
|
|
345
|
-
providers.add(SOCIAL[name] ?? name);
|
|
346
|
-
if ((0, record_set_1.str)(summary.ProviderType) !== 'SAML' && (0, record_set_1.str)(summary.ProviderType) !== 'OIDC')
|
|
347
|
-
continue;
|
|
348
|
-
const res = await api.call('DescribeIdentityProvider', { UserPoolId: poolId, ProviderName: name });
|
|
349
|
-
const conn = cognitoSsoConnection((0, record_set_1.isObj)(res.IdentityProvider) ? res.IdentityProvider : {});
|
|
350
|
-
if (conn)
|
|
351
|
-
set.add('sso_connection', conn, conn.id);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
// Users.
|
|
355
|
-
progress('users');
|
|
356
|
-
const raw = opts.usersText !== undefined ? parseListUsersOutput(opts.usersText) : await api.all('ListUsers', { UserPoolId: poolId, Limit: 60 }, 'Users', 'PaginationToken');
|
|
357
|
-
const byUsername = new Map();
|
|
358
|
-
const status = {};
|
|
359
|
-
let totpUsers = 0;
|
|
360
|
-
for (const u of raw) {
|
|
361
|
-
const user = mapCognitoUser(u);
|
|
362
|
-
if (!user) {
|
|
363
|
-
set.omit('user', 'no sub, or no email, phone number or username');
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
const username = (0, record_set_1.str)(u.Username);
|
|
367
|
-
if (username)
|
|
368
|
-
byUsername.set(username, user.id);
|
|
369
|
-
const st = (0, record_set_1.str)(u.UserStatus) ?? 'UNKNOWN';
|
|
370
|
-
status[st] = (status[st] ?? 0) + 1;
|
|
371
|
-
set.add('user', user, user.id);
|
|
372
|
-
const attrs = attributesOf(u);
|
|
373
|
-
for (const identity of cognitoIdentities(user.id, attrs.identities)) {
|
|
374
|
-
set.add('identity', identity, `${identity.provider}:${identity.provider_user_id}`);
|
|
375
|
-
providers.add(identity.provider);
|
|
376
|
-
}
|
|
377
|
-
let detail = u;
|
|
378
|
-
if (opts.mfa && api && username && st !== 'EXTERNAL_PROVIDER') {
|
|
379
|
-
detail = { ...u, ...(await api.call('AdminGetUser', { UserPoolId: poolId, Username: username })) };
|
|
380
|
-
}
|
|
381
|
-
const { factors, totp } = cognitoFactors(user.id, detail, attrs);
|
|
382
|
-
for (const f of factors)
|
|
383
|
-
set.add('mfa_factor', f);
|
|
384
|
-
if (totp)
|
|
385
|
-
totpUsers++;
|
|
386
|
-
}
|
|
387
|
-
if (totpUsers)
|
|
388
|
-
set.omit('mfa_factor', 'Cognito never exports TOTP secrets: these users enrol an authenticator app again in Atlas', totpUsers);
|
|
389
|
-
if (!opts.mfa && api && raw.length) {
|
|
390
|
-
set.warn('Only legacy SMS MFA settings were read. Pass the mfa option (one AdminGetUser per user, billed by AWS) to export every user\'s SMS and email factors and count TOTP users.');
|
|
391
|
-
}
|
|
392
|
-
// Group members → user roles.
|
|
393
|
-
if (api && groupKeys.size) {
|
|
394
|
-
progress('group members');
|
|
395
|
-
const rolesOf = new Map();
|
|
396
|
-
for (const [name, key] of groupKeys) {
|
|
397
|
-
for (const m of await api.all('ListUsersInGroup', { UserPoolId: poolId, GroupName: name, Limit: 60 }, 'Users', 'NextToken')) {
|
|
398
|
-
const id = (0, record_set_1.str)(attributesOf(m).sub) ?? byUsername.get((0, record_set_1.str)(m.Username) ?? '');
|
|
399
|
-
if (!id)
|
|
400
|
-
continue;
|
|
401
|
-
const list = rolesOf.get(id) ?? [];
|
|
402
|
-
list.push(key);
|
|
403
|
-
rolesOf.set(id, list);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
for (const user of set.list('user')) {
|
|
407
|
-
const roles = rolesOf.get(user.id);
|
|
408
|
-
if (roles?.length)
|
|
409
|
-
user.roles = [...new Set(roles)];
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
// The pool's public signing keys (no credentials needed).
|
|
413
|
-
try {
|
|
414
|
-
const res = await (opts.fetchImpl ?? fetch)(`https://cognito-idp.${region}.amazonaws.com/${poolId}/.well-known/jwks.json`);
|
|
415
|
-
if (res.ok) {
|
|
416
|
-
const body = await res.json();
|
|
417
|
-
for (const jwk of (0, record_set_1.objs)((0, record_set_1.isObj)(body) ? body.keys : undefined)) {
|
|
418
|
-
const kid = (0, record_set_1.str)(jwk.kid);
|
|
419
|
-
if (kid)
|
|
420
|
-
set.add('jwks', { kid, jwk }, kid);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
catch {
|
|
425
|
-
set.warn('Could not read the user pool\'s JWKS; old tokens verify through the bridge only.');
|
|
426
|
-
}
|
|
427
|
-
if (set.count('user')) {
|
|
428
|
-
set.warn('Cognito never exports password hashes. Turn on the cognito lazy-migration preset: each password is checked against Cognito (InitiateAuth, USER_PASSWORD_AUTH) on its first Atlas sign-in, then stored as Argon2id.');
|
|
429
|
-
set.omit('password', 'Cognito does not export password hashes (lazy migration moves them)', set.count('user') - (status.EXTERNAL_PROVIDER ?? 0));
|
|
430
|
-
}
|
|
431
|
-
if (status.FORCE_CHANGE_PASSWORD)
|
|
432
|
-
set.warn(`${status.FORCE_CHANGE_PASSWORD} user(s) still have an admin-set temporary password (FORCE_CHANGE_PASSWORD): Cognito answers lazy migration with a new-password challenge, so they reset their password in Atlas.`);
|
|
433
|
-
if (status.RESET_REQUIRED)
|
|
434
|
-
set.warn(`${status.RESET_REQUIRED} user(s) must reset their password (RESET_REQUIRED): they cannot move by lazy migration and reset it in Atlas.`);
|
|
435
|
-
if (status.UNCONFIRMED)
|
|
436
|
-
set.warn(`${status.UNCONFIRMED} user(s) never confirmed their sign-up (UNCONFIRMED): imported with unverified addresses.`);
|
|
437
|
-
set.manifest.providers = [...providers].sort();
|
|
438
|
-
set.manifest.settings = { user_pool_id: poolId, region, user_status: status };
|
|
439
|
-
return set;
|
|
440
|
-
}
|
|
441
|
-
//# sourceMappingURL=cognito.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cognito.js","sourceRoot":"","sources":["../../../src/migrate/export/cognito.ts"],"names":[],"mappings":";;;AA0DA,oCAEC;AAQD,0BAEC;AAGD,4BAEC;AAQD,wCA2BC;AAwFD,oCAQC;AASD,0CAQC;AAGD,wCAsCC;AAGD,8CAmBC;AAGD,wCAQC;AAGD,oDAUC;AAGD,oDAiCC;AAID,sCA2HC;AAzdD,6CAAqD;AAErD,6CAA0F;AAC1F,mDAAwC;AACxC,+CAA+C;AAmD/C,MAAM,OAAO,GAAG,0CAA0C,CAAC;AAE3D,qFAAqF;AACrF,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,+EAA+E;AAE/E,M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C,WAAW;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,2FAA2F,CAAC,CAAC;IACnJ,GAAG,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,GAAG,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAC9E,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TranslationResult } from '../framework/plugin';
|
|
2
|
-
import { type VendorHttp } from './vendor-http';
|
|
3
|
-
/**
|
|
4
|
-
* `atlas migrate corbado config` — Corbado exposes no settings API worth
|
|
5
|
-
* reading, so the sign-in methods are inferred from what the project's users
|
|
6
|
-
* actually have (login identifiers by type, from the Backend API) and the
|
|
7
|
-
* rest is reported by where it lives in the Corbado console.
|
|
8
|
-
*/
|
|
9
|
-
export interface CorbadoConfigSnapshot {
|
|
10
|
-
projectId: string;
|
|
11
|
-
rpId?: string;
|
|
12
|
-
/** Number of login identifiers by type; null when the count could not be read. */
|
|
13
|
-
identifiers: {
|
|
14
|
-
email: number | null;
|
|
15
|
-
phone: number | null;
|
|
16
|
-
username: number | null;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare function fetchCorbadoConfig(http: VendorHttp, projectId: string, rpId?: string): Promise<CorbadoConfigSnapshot>;
|
|
20
|
-
export declare function translateCorbadoConfig(snap: CorbadoConfigSnapshot): TranslationResult;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchCorbadoConfig = fetchCorbadoConfig;
|
|
4
|
-
exports.translateCorbadoConfig = translateCorbadoConfig;
|
|
5
|
-
const record_set_1 = require("./record-set");
|
|
6
|
-
const translate_kit_1 = require("./translate-kit");
|
|
7
|
-
const vendor_http_1 = require("./vendor-http");
|
|
8
|
-
async function count(http, type) {
|
|
9
|
-
try {
|
|
10
|
-
const { body } = await http.get(`/v2/identifiers?page=1&pageSize=1&filter%5B%5D=${encodeURIComponent(`identifierType:eq:${type}`)}`);
|
|
11
|
-
const total = (0, record_set_1.isObj)(body?.paging) ? body.paging.totalItems : undefined;
|
|
12
|
-
return typeof total === 'number' ? total : null;
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
if (err instanceof vendor_http_1.VendorApiError && [400, 403, 404].includes(err.status))
|
|
16
|
-
return null;
|
|
17
|
-
throw err;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
async function fetchCorbadoConfig(http, projectId, rpId) {
|
|
21
|
-
return {
|
|
22
|
-
projectId,
|
|
23
|
-
...(rpId ? { rpId } : {}),
|
|
24
|
-
identifiers: { email: await count(http, 'email'), phone: await count(http, 'phone'), username: await count(http, 'username') },
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function translateCorbadoConfig(snap) {
|
|
28
|
-
const b = new translate_kit_1.ConfigBuilder();
|
|
29
|
-
b.set('strategies.passkey', true);
|
|
30
|
-
b.add('mapped', 'authentication', 'passkeys', 'Passkey sign-in stays on; exported credentials keep working while Atlas is served from the same relying-party domain.', 'auth_config.strategies.passkey');
|
|
31
|
-
b.set('accountUx.passkeySignUp.enabled', true);
|
|
32
|
-
b.add('mapped', 'authentication', 'passkey-first sign-up', 'Corbado accounts start from a passkey: Atlas offers passkey sign-up.', 'auth_config.accountUx.passkeySignUp');
|
|
33
|
-
const { email, phone, username } = snap.identifiers;
|
|
34
|
-
if (email) {
|
|
35
|
-
b.set('strategies.emailCode', true);
|
|
36
|
-
b.add('mapped', 'identifiers', 'email', `${email} email identifier(s): email code sign-in (the fallback when a passkey is not available).`, 'auth_config.strategies.emailCode');
|
|
37
|
-
}
|
|
38
|
-
if (phone) {
|
|
39
|
-
b.set('strategies.phoneCode', true);
|
|
40
|
-
b.add('mapped', 'identifiers', 'phone', `${phone} phone identifier(s): SMS code sign-in.`, 'auth_config.strategies.phoneCode');
|
|
41
|
-
}
|
|
42
|
-
if (username) {
|
|
43
|
-
b.set('strategies.username', true);
|
|
44
|
-
b.add('mapped', 'identifiers', 'username', `${username} username identifier(s).`, 'auth_config.strategies.username');
|
|
45
|
-
}
|
|
46
|
-
if (email === null && phone === null && username === null) {
|
|
47
|
-
b.add('manual', 'identifiers', 'login identifiers', 'Corbado did not list your identifiers; turn on the matching Atlas sign-in methods (emailCode, phoneCode, username) yourself.', 'auth_config.strategies');
|
|
48
|
-
}
|
|
49
|
-
if (snap.rpId)
|
|
50
|
-
b.add('differs', 'passkeys', 'relying party', `Passkeys are bound to ${snap.rpId}: serve Atlas from that domain or a subdomain (a custom domain) so exported passkeys keep working.`);
|
|
51
|
-
else
|
|
52
|
-
b.add('manual', 'passkeys', 'relying party', 'Corbado does not return the relying-party id: pass it with --corbado-rp-id so passkeys can be exported, and serve Atlas from that domain.');
|
|
53
|
-
for (const [setting, where] of [
|
|
54
|
-
['allowed origins and redirect URLs', 'Developer panel → Application URLs'],
|
|
55
|
-
['session lifetimes (short and long session)', 'Developer panel → Sessions'],
|
|
56
|
-
['social login', 'Developer panel → Authentication methods'],
|
|
57
|
-
['webhooks and email / SMS templates', 'Developer panel → Webhooks, Communication'],
|
|
58
|
-
]) {
|
|
59
|
-
b.add('manual', 'settings not in the API', setting, `Corbado does not expose this by API; copy it from the Corbado console (${where}). Atlas: dashboard → Sessions / Redirect URLs / Providers / Webhooks.`);
|
|
60
|
-
}
|
|
61
|
-
return b.result(`Corbado project ${snap.projectId}`, { bridge: { preset: 'corbado', vars: { project_id: snap.projectId } } });
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=corbado-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"corbado-config.js","sourceRoot":"","sources":["../../../src/migrate/export/corbado-config.ts"],"names":[],"mappings":";;AA6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B,EAAE,8HAA8H,EAAE,wBAAwB,CAAC,CAAC;IAChN,CAAC;IACD,IAAI,IAAI,CAAC,IAAI;QAAE,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,yBAAyB,IAAI,CAAC,IAAI,oGAAoG,CAAC,CAAC;;QAChM,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,2IAA2I,CAAC,CAAC;IAC/L,KAAK,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI;QAC7B,CAAC,mCAAmC,EAAE,oCAAoC,CAAC;QAC3E,CAAC,4CAA4C,EAAE,4BAA4B,CAAC;QAC5E,CAAC,cAAc,EAAE,0CAA0C,CAAC;QAC5D,CAAC,oCAAoC,EAAE,2CAA2C,CAAC;KAC3E,EAAE,CAAC;QACX,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,yBAAyB,EAAE,OAAO,EAAE,0EAA0E,KAAK,wEAAwE,CAAC,CAAC;IAC/M,CAAC;IACD,OAAO,CAAC,CAAC,MAAM,CAAC,mBAAmB,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;AAChI,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { UserRecord } from '@atlasauth/migrate';
|
|
2
|
-
import { RecordSet, type Obj } from './record-set';
|
|
3
|
-
import { VendorHttp } from './vendor-http';
|
|
4
|
-
/**
|
|
5
|
-
* `atlas migrate export corbado` — a Corbado project onto the canonical bundle
|
|
6
|
-
* models, read with the project id and API secret (Backend API v2, HTTP Basic)
|
|
7
|
-
* on this machine.
|
|
8
|
-
*
|
|
9
|
-
* - users (`GET /v2/users`, with their email, phone and username
|
|
10
|
-
* identifiers; a `pending` identifier is unverified, `verified` and
|
|
11
|
-
* `primary` are verified); deleted users skipped, disabled users banned;
|
|
12
|
-
* - passkeys: `GET /v2/users/{id}/fullCredentials` returns each credential id
|
|
13
|
-
* AND its public key (base64url), so passkeys move and keep working. A
|
|
14
|
-
* passkey is bound to its relying-party id, which the API does not return:
|
|
15
|
-
* pass it with --corbado-rp-id (your Corbado relying party / domain), and
|
|
16
|
-
* Atlas must be served from that domain (or a subdomain of it) for the
|
|
17
|
-
* passkeys to keep working;
|
|
18
|
-
* - Corbado holds no passwords, TOTP seeds, organizations or API keys.
|
|
19
|
-
*
|
|
20
|
-
* Sessions are Corbado short-session JWTs, bridged by the `corbado` preset.
|
|
21
|
-
*/
|
|
22
|
-
export interface CorbadoExportOptions {
|
|
23
|
-
projectId: string;
|
|
24
|
-
apiSecret: string;
|
|
25
|
-
/** Backend API origin (default https://backendapi.cloud.corbado.io). */
|
|
26
|
-
baseUrl?: string;
|
|
27
|
-
/** The passkeys' relying-party id; without it passkeys are not exported. */
|
|
28
|
-
rpId?: string;
|
|
29
|
-
fetchImpl?: typeof fetch;
|
|
30
|
-
sleep?: (ms: number) => Promise<void>;
|
|
31
|
-
onProgress?: (message: string) => void;
|
|
32
|
-
}
|
|
33
|
-
export declare const CORBADO_BACKEND = "https://backendapi.cloud.corbado.io";
|
|
34
|
-
export declare function corbadoHttp(o: Pick<CorbadoExportOptions, 'projectId' | 'apiSecret' | 'baseUrl' | 'fetchImpl' | 'sleep'>): VendorHttp;
|
|
35
|
-
export declare function exportCorbado(opts: CorbadoExportOptions): Promise<RecordSet>;
|
|
36
|
-
/** One Corbado `userAggregate` → a user record; 'deleted' for removed users. */
|
|
37
|
-
export declare function mapCorbadoUser(u: Obj): UserRecord | 'deleted' | null;
|