@atlasauth/backend 0.23.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/auth0-session.d.ts +23 -0
  3. package/dist/auth0-session.js +80 -0
  4. package/dist/auth0-session.js.map +1 -0
  5. package/dist/better-auth.d.ts +4 -8
  6. package/dist/better-auth.js +42 -150
  7. package/dist/better-auth.js.map +1 -1
  8. package/dist/client/abac.d.ts +132 -0
  9. package/dist/client/abac.js +48 -0
  10. package/dist/client/abac.js.map +1 -0
  11. package/dist/client/access-policies.d.ts +100 -0
  12. package/dist/client/access-policies.js +29 -0
  13. package/dist/client/access-policies.js.map +1 -0
  14. package/dist/client/action-gallery.d.ts +1 -1
  15. package/dist/client/action-gallery.js.map +1 -1
  16. package/dist/client/actions.d.ts +129 -6
  17. package/dist/client/actions.js +4 -0
  18. package/dist/client/actions.js.map +1 -1
  19. package/dist/client/analytics-reports.d.ts +215 -0
  20. package/dist/client/analytics-reports.js +56 -0
  21. package/dist/client/analytics-reports.js.map +1 -0
  22. package/dist/client/app-catalog.d.ts +74 -0
  23. package/dist/client/app-catalog.js +30 -0
  24. package/dist/client/app-catalog.js.map +1 -0
  25. package/dist/client/attack-protection.d.ts +10 -0
  26. package/dist/client/attack-protection.js +8 -0
  27. package/dist/client/attack-protection.js.map +1 -1
  28. package/dist/client/audit-events.d.ts +71 -0
  29. package/dist/client/audit-events.js +28 -0
  30. package/dist/client/audit-events.js.map +1 -1
  31. package/dist/client/credentials.d.ts +8 -0
  32. package/dist/client/credentials.js.map +1 -1
  33. package/dist/client/delegated-ui-proxy.d.ts +25 -0
  34. package/dist/client/delegated-ui-proxy.js +46 -0
  35. package/dist/client/delegated-ui-proxy.js.map +1 -0
  36. package/dist/client/devices.d.ts +44 -0
  37. package/dist/client/devices.js +26 -0
  38. package/dist/client/devices.js.map +1 -0
  39. package/dist/client/email-templates.d.ts +1 -1
  40. package/dist/client/email-templates.js.map +1 -1
  41. package/dist/client/flags.d.ts +101 -0
  42. package/dist/client/flags.js +104 -0
  43. package/dist/client/flags.js.map +1 -0
  44. package/dist/client/groups.d.ts +146 -0
  45. package/dist/client/groups.js +67 -0
  46. package/dist/client/groups.js.map +1 -0
  47. package/dist/client/identity-verification.d.ts +62 -0
  48. package/dist/client/identity-verification.js +39 -0
  49. package/dist/client/identity-verification.js.map +1 -0
  50. package/dist/client/index.d.ts +997 -2
  51. package/dist/client/index.js +77 -0
  52. package/dist/client/index.js.map +1 -1
  53. package/dist/client/journeys.d.ts +108 -0
  54. package/dist/client/journeys.js +35 -0
  55. package/dist/client/journeys.js.map +1 -0
  56. package/dist/client/log-streams.d.ts +1 -1
  57. package/dist/client/marketing.d.ts +67 -0
  58. package/dist/client/marketing.js +26 -0
  59. package/dist/client/marketing.js.map +1 -0
  60. package/dist/client/mcp-gateways.d.ts +54 -0
  61. package/dist/client/mcp-gateways.js +25 -0
  62. package/dist/client/mcp-gateways.js.map +1 -0
  63. package/dist/client/messaging.d.ts +14 -3
  64. package/dist/client/messaging.js.map +1 -1
  65. package/dist/client/mfa-factors.d.ts +120 -0
  66. package/dist/client/mfa-factors.js +73 -0
  67. package/dist/client/mfa-factors.js.map +1 -0
  68. package/dist/client/migrations.d.ts +286 -0
  69. package/dist/client/migrations.js +103 -0
  70. package/dist/client/migrations.js.map +1 -0
  71. package/dist/client/network-acls.d.ts +6 -1
  72. package/dist/client/network-acls.js.map +1 -1
  73. package/dist/client/network-zones.d.ts +56 -0
  74. package/dist/client/network-zones.js +29 -0
  75. package/dist/client/network-zones.js.map +1 -0
  76. package/dist/client/notifications.d.ts +1 -1
  77. package/dist/client/notifications.js.map +1 -1
  78. package/dist/client/oauth-clients.d.ts +183 -3
  79. package/dist/client/oauth-clients.js +64 -0
  80. package/dist/client/oauth-clients.js.map +1 -1
  81. package/dist/client/org-role-grants.d.ts +57 -0
  82. package/dist/client/org-role-grants.js +40 -0
  83. package/dist/client/org-role-grants.js.map +1 -0
  84. package/dist/client/organizations.d.ts +52 -0
  85. package/dist/client/organizations.js +44 -0
  86. package/dist/client/organizations.js.map +1 -1
  87. package/dist/client/page-templates.d.ts +78 -0
  88. package/dist/client/page-templates.js +31 -0
  89. package/dist/client/page-templates.js.map +1 -0
  90. package/dist/client/passkey-api.d.ts +73 -0
  91. package/dist/client/passkey-api.js +34 -0
  92. package/dist/client/passkey-api.js.map +1 -0
  93. package/dist/client/resources.d.ts +149 -0
  94. package/dist/client/resources.js +73 -0
  95. package/dist/client/resources.js.map +1 -0
  96. package/dist/client/risk-based-mfa.d.ts +147 -0
  97. package/dist/client/risk-based-mfa.js +30 -0
  98. package/dist/client/risk-based-mfa.js.map +1 -1
  99. package/dist/client/roles.d.ts +4 -0
  100. package/dist/client/roles.js.map +1 -1
  101. package/dist/client/service-connectors.d.ts +83 -0
  102. package/dist/client/service-connectors.js +33 -0
  103. package/dist/client/service-connectors.js.map +1 -0
  104. package/dist/client/ssf.d.ts +111 -0
  105. package/dist/client/ssf.js +49 -0
  106. package/dist/client/ssf.js.map +1 -0
  107. package/dist/client/sso-onboarding.d.ts +6 -0
  108. package/dist/client/sso-onboarding.js.map +1 -1
  109. package/dist/client/users.d.ts +302 -0
  110. package/dist/client/users.js +125 -0
  111. package/dist/client/users.js.map +1 -1
  112. package/dist/client/vault.d.ts +85 -0
  113. package/dist/client/vault.js +50 -0
  114. package/dist/client/vault.js.map +1 -0
  115. package/dist/client/vc.d.ts +128 -0
  116. package/dist/client/vc.js +43 -0
  117. package/dist/client/vc.js.map +1 -0
  118. package/dist/client/webhooks.d.ts +31 -2
  119. package/dist/client/webhooks.js.map +1 -1
  120. package/dist/client/workflows.d.ts +131 -0
  121. package/dist/client/workflows.js +36 -0
  122. package/dist/client/workflows.js.map +1 -0
  123. package/dist/framework-bridge.d.ts +98 -0
  124. package/dist/framework-bridge.js +264 -0
  125. package/dist/framework-bridge.js.map +1 -0
  126. package/dist/framework-sessions.d.ts +147 -0
  127. package/dist/framework-sessions.js +544 -0
  128. package/dist/framework-sessions.js.map +1 -0
  129. package/dist/index.d.ts +11 -1
  130. package/dist/index.js +19 -2
  131. package/dist/index.js.map +1 -1
  132. package/dist/legacy-issuer-presets.d.ts +85 -0
  133. package/dist/legacy-issuer-presets.js +165 -0
  134. package/dist/legacy-issuer-presets.js.map +1 -0
  135. package/dist/legacy-issuers.d.ts +16 -2
  136. package/dist/legacy-issuers.js +16 -1
  137. package/dist/legacy-issuers.js.map +1 -1
  138. package/dist/legacy-verify.d.ts +103 -0
  139. package/dist/legacy-verify.js +244 -0
  140. package/dist/legacy-verify.js.map +1 -0
  141. package/dist/magic-did.d.ts +5 -0
  142. package/dist/magic-did.js +49 -0
  143. package/dist/magic-did.js.map +1 -0
  144. package/dist/migration-bridge.d.ts +162 -0
  145. package/dist/migration-bridge.js +354 -0
  146. package/dist/migration-bridge.js.map +1 -0
  147. package/dist/migration-presets-g3.d.ts +2 -0
  148. package/dist/migration-presets-g3.js +254 -0
  149. package/dist/migration-presets-g3.js.map +1 -0
  150. package/dist/migration-presets-g4/authentik.d.ts +14 -0
  151. package/dist/migration-presets-g4/authentik.js +37 -0
  152. package/dist/migration-presets-g4/authentik.js.map +1 -0
  153. package/dist/migration-presets-g4/fusionauth.d.ts +2 -0
  154. package/dist/migration-presets-g4/fusionauth.js +52 -0
  155. package/dist/migration-presets-g4/fusionauth.js.map +1 -0
  156. package/dist/migration-presets-g4/hanko.d.ts +12 -0
  157. package/dist/migration-presets-g4/hanko.js +46 -0
  158. package/dist/migration-presets-g4/hanko.js.map +1 -0
  159. package/dist/migration-presets-g4/keycloak.d.ts +16 -0
  160. package/dist/migration-presets-g4/keycloak.js +37 -0
  161. package/dist/migration-presets-g4/keycloak.js.map +1 -0
  162. package/dist/migration-presets-g4/logto.d.ts +12 -0
  163. package/dist/migration-presets-g4/logto.js +35 -0
  164. package/dist/migration-presets-g4/logto.js.map +1 -0
  165. package/dist/migration-presets-g4/ory.d.ts +2 -0
  166. package/dist/migration-presets-g4/ory.js +67 -0
  167. package/dist/migration-presets-g4/ory.js.map +1 -0
  168. package/dist/migration-presets-g4/supertokens.d.ts +13 -0
  169. package/dist/migration-presets-g4/supertokens.js +35 -0
  170. package/dist/migration-presets-g4/supertokens.js.map +1 -0
  171. package/dist/migration-presets-g4/zitadel.d.ts +2 -0
  172. package/dist/migration-presets-g4/zitadel.js +36 -0
  173. package/dist/migration-presets-g4/zitadel.js.map +1 -0
  174. package/dist/migration-presets-g4.d.ts +10 -0
  175. package/dist/migration-presets-g4.js +30 -0
  176. package/dist/migration-presets-g4.js.map +1 -0
  177. package/dist/migration-presets.d.ts +156 -0
  178. package/dist/migration-presets.js +536 -0
  179. package/dist/migration-presets.js.map +1 -0
  180. package/dist/request-auth.d.ts +32 -0
  181. package/dist/request-auth.js +72 -0
  182. package/dist/request-auth.js.map +1 -0
  183. package/dist/verify.d.ts +2 -0
  184. package/dist/verify.js.map +1 -1
  185. package/dist/workos-session.d.ts +30 -0
  186. package/dist/workos-session.js +123 -0
  187. package/dist/workos-session.js.map +1 -0
  188. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ /**
3
+ * authentik. An application's OAuth2/OpenID provider signs its ID and access
4
+ * tokens with the signing key chosen on the provider (RS256 / ES256). The
5
+ * issuer is per provider and ends in a slash — `iss` is compared as a string,
6
+ * so the template restores the slash the variable resolver trims:
7
+ * https://auth.example.com/application/o/<application slug>/
8
+ * with the keys at `<issuer>jwks/`.
9
+ *
10
+ * `sub` depends on the provider's "Subject mode" (hashed user id by default);
11
+ * the export keys users by the same mode, so the two agree. `sid` is authentik's
12
+ * session id (a hash), shared by every token of one sign-in.
13
+ */
14
+ export declare const AUTHENTIK_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AUTHENTIK_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * authentik. An application's OAuth2/OpenID provider signs its ID and access
6
+ * tokens with the signing key chosen on the provider (RS256 / ES256). The
7
+ * issuer is per provider and ends in a slash — `iss` is compared as a string,
8
+ * so the template restores the slash the variable resolver trims:
9
+ * https://auth.example.com/application/o/<application slug>/
10
+ * with the keys at `<issuer>jwks/`.
11
+ *
12
+ * `sub` depends on the provider's "Subject mode" (hashed user id by default);
13
+ * the export keys users by the same mode, so the two agree. `sid` is authentik's
14
+ * session id (a hash), shared by every token of one sign-in.
15
+ */
16
+ exports.AUTHENTIK_BRIDGE_PRESETS = [
17
+ {
18
+ id: 'authentik',
19
+ label: 'authentik (OAuth2 / OpenID provider tokens)',
20
+ mode: 'jwt',
21
+ vars: { issuer: "The provider's issuer URL without the trailing slash (https://auth.example.com/application/o/<application slug>)", client_id: "The provider's client id (the tokens' aud)" },
22
+ jwt: {
23
+ issuer: '{issuer}/',
24
+ keysUrl: '{issuer}/jwks/',
25
+ audience: ['{client_id}'],
26
+ // A provider without a signing key signs HS256 with its client secret: no public keys exist for it.
27
+ algorithms: ['RS256', 'RS384', 'RS512', 'PS256', 'ES256', 'ES384'],
28
+ claims: { subject: 'sub', email: 'email', emailVerified: 'email_verified', name: 'name', sessionKey: 'sid', mfa: 'amr:mfa' },
29
+ },
30
+ // authentik is the identity provider, not the app: the app's own OIDC client library keeps the token
31
+ // (next-auth, passport-openidconnect, oauth2-proxy). Pass it as a bearer token or from your own extractor.
32
+ cookies: [],
33
+ bearer: true,
34
+ notes: 'Set the provider\'s Subject mode to the one the export used (hashed user id by default; the export records it). The provider needs a signing key: tokens signed with the client secret (HS256) cannot be verified from public keys. With the "global" issuer mode, point the preset at the per-provider URL anyway: the keys are served there.',
35
+ },
36
+ ];
37
+ //# sourceMappingURL=authentik.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentik.js","sourceRoot":"","sources":["../../src/migration-presets-g4/authentik.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AACU,QAAA,wBAAwB,GAAqC;IACxE;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,6CAA6C;QACpD,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,MAAM,EAAE,kHAAkH,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC7L,GAAG,EAAE;YACH,MAAM,EAAE,WAAW;YACnB,OAAO,EAAE,gBAAgB;YACzB,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,oGAAoG;YACpG,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAClE,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE;SAC7H;QACD,qGAAqG;QACrG,2GAA2G;QAC3G,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,gVAAgV;KACnV;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ export declare const FUSIONAUTH_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FUSIONAUTH_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * FusionAuth. The access token (`app.at` cookie, or the Bearer token an API
6
+ * client holds) is a JWT whose `iss` is the TENANT's issuer string: `acme.com`
7
+ * by default (what `issuer_name` takes), or an https URL when the tenant was
8
+ * set up that way (the `fusionauth_url_issuer` preset takes the base URL).
9
+ * Keys come from `/.well-known/jwks.json` and publish only asymmetric keys:
10
+ * a tenant still on the default HS256 signing key has to switch the
11
+ * application's access-token key to an RSA or EC key before the bridge can
12
+ * verify its tokens. `sub` is the FusionAuth user id the export keys users by,
13
+ * `sid` the SSO session, `amr` lists `mfa` after a second factor.
14
+ */
15
+ const WEEK = 7 * 24 * 3600;
16
+ const CLAIMS = { subject: 'sub', email: 'email', emailVerified: 'email_verified', name: 'name', sessionKey: 'sid', mfa: 'amr:mfa' };
17
+ exports.FUSIONAUTH_BRIDGE_PRESETS = [
18
+ {
19
+ id: 'fusionauth',
20
+ label: 'FusionAuth (access token, tenant issuer such as acme.com)',
21
+ mode: 'jwt',
22
+ vars: { base_url: 'FusionAuth URL (https://auth.example.com)', issuer_name: 'The tenant issuer (Tenants → General → Issuer, `acme.com` by default)' },
23
+ jwt: {
24
+ issuer: '{issuer_name}',
25
+ keysUrl: '{base_url}/.well-known/jwks.json',
26
+ algorithms: ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512'],
27
+ claims: CLAIMS,
28
+ expiredGraceSeconds: WEEK,
29
+ },
30
+ cookies: ['app.at'],
31
+ clearCookies: ['app.at', 'app.rt', 'app.idt', 'app.match_hint', 'app.locale', 'app.ssoToken'],
32
+ bearer: true,
33
+ notes: 'The application must sign access tokens with an RSA or EC key (a default HS256 key has no public JWKS entry).',
34
+ },
35
+ {
36
+ id: 'fusionauth_url_issuer',
37
+ label: 'FusionAuth (access token, tenant issuer is the https URL)',
38
+ mode: 'jwt',
39
+ vars: { base_url: 'FusionAuth URL, also the tenant issuer (https://auth.example.com)' },
40
+ jwt: {
41
+ issuer: '{base_url}',
42
+ keysUrl: '{base_url}/.well-known/jwks.json',
43
+ algorithms: ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512'],
44
+ claims: CLAIMS,
45
+ expiredGraceSeconds: WEEK,
46
+ },
47
+ cookies: ['app.at'],
48
+ clearCookies: ['app.at', 'app.rt', 'app.idt', 'app.match_hint', 'app.locale', 'app.ssoToken'],
49
+ bearer: true,
50
+ },
51
+ ];
52
+ //# sourceMappingURL=fusionauth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fusionauth.js","sourceRoot":"","sources":["../../src/migration-presets-g4/fusionauth.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACH,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAC3B,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAEvH,QAAA,yBAAyB,GAAqC;IACzE;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,2DAA2D;QAClE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,2CAA2C,EAAE,WAAW,EAAE,uEAAuE,EAAE;QACrJ,GAAG,EAAE;YACH,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,kCAAkC;YAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAClE,MAAM,EAAE,MAAM;YACd,mBAAmB,EAAE,IAAI;SAC1B;QACD,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,CAAC;QAC7F,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,+GAA+G;KACvH;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,KAAK,EAAE,2DAA2D;QAClE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,mEAAmE,EAAE;QACvF,GAAG,EAAE;YACH,MAAM,EAAE,YAAY;YACpB,OAAO,EAAE,kCAAkC;YAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAClE,MAAM,EAAE,MAAM;YACd,mBAAmB,EAAE,IAAI;SAC1B;QACD,OAAO,EAAE,CAAC,QAAQ,CAAC;QACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,CAAC;QAC7F,MAAM,EAAE,IAAI;KACb;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ /**
3
+ * Hanko. The backend signs a session JWT (RS256, a rotating key set at
4
+ * `/.well-known/jwks.json` on the public API) and writes it to the `hanko`
5
+ * cookie (`cookie.name`); the frontend SDK and hanko-elements read the same
6
+ * token. Claims: `sub` (the user's id — what the export keys users by),
7
+ * `session_id`, `exp`, `iat`, `aud`, `iss` (when `session.issuer` is set) and
8
+ * `email` / `username`. `email` is an object (`address`, `is_primary`,
9
+ * `is_verified`), so it is not mapped to a claim; the imported user already
10
+ * holds the addresses.
11
+ */
12
+ export declare const HANKO_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HANKO_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * Hanko. The backend signs a session JWT (RS256, a rotating key set at
6
+ * `/.well-known/jwks.json` on the public API) and writes it to the `hanko`
7
+ * cookie (`cookie.name`); the frontend SDK and hanko-elements read the same
8
+ * token. Claims: `sub` (the user's id — what the export keys users by),
9
+ * `session_id`, `exp`, `iat`, `aud`, `iss` (when `session.issuer` is set) and
10
+ * `email` / `username`. `email` is an object (`address`, `is_primary`,
11
+ * `is_verified`), so it is not mapped to a claim; the imported user already
12
+ * holds the addresses.
13
+ */
14
+ exports.HANKO_BRIDGE_PRESETS = [
15
+ {
16
+ id: 'hanko',
17
+ label: 'Hanko (session JWT, issuer = the API URL)',
18
+ mode: 'jwt',
19
+ vars: { base_url: 'The Hanko API URL (https://<project id>.hanko.io, or your own https://hanko.example.com)' },
20
+ jwt: {
21
+ issuer: '{base_url}',
22
+ keysUrl: '{base_url}/.well-known/jwks.json',
23
+ algorithms: ['RS256', 'RS384', 'RS512', 'PS256', 'ES256'],
24
+ claims: { subject: 'sub', sessionKey: 'session_id' },
25
+ },
26
+ cookies: ['hanko'],
27
+ bearer: true,
28
+ sharesAtlasCookie: false,
29
+ notes: 'Hanko Cloud sets iss to the project URL. Self-hosted: use hanko_jwt when session.issuer is something else. The cookie is named by cookie.name in Hanko\'s config (default hanko).',
30
+ },
31
+ {
32
+ id: 'hanko_jwt',
33
+ label: 'Hanko (session JWT, custom issuer)',
34
+ mode: 'jwt',
35
+ vars: { base_url: 'The Hanko API URL (keys are read from /.well-known/jwks.json)', issuer: "The session.issuer you configured (the token's iss)" },
36
+ jwt: {
37
+ issuer: '{issuer}',
38
+ keysUrl: '{base_url}/.well-known/jwks.json',
39
+ algorithms: ['RS256', 'RS384', 'RS512', 'PS256', 'ES256'],
40
+ claims: { subject: 'sub', sessionKey: 'session_id' },
41
+ },
42
+ cookies: ['hanko'],
43
+ bearer: true,
44
+ },
45
+ ];
46
+ //# sourceMappingURL=hanko.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hanko.js","sourceRoot":"","sources":["../../src/migration-presets-g4/hanko.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;GASG;AACU,QAAA,oBAAoB,GAAqC;IACpE;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,2CAA2C;QAClD,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,0FAA0F,EAAE;QAC9G,GAAG,EAAE;YACH,MAAM,EAAE,YAAY;YACpB,OAAO,EAAE,kCAAkC;YAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YACzD,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE;SACrD;QACD,OAAO,EAAE,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,IAAI;QACZ,iBAAiB,EAAE,KAAK;QACxB,KAAK,EACH,mLAAmL;KACtL;IACD;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,oCAAoC;QAC3C,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,+DAA+D,EAAE,MAAM,EAAE,qDAAqD,EAAE;QAClJ,GAAG,EAAE;YACH,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE,kCAAkC;YAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YACzD,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE;SACrD;QACD,OAAO,EAAE,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,IAAI;KACb;CACF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ /**
3
+ * Keycloak. Its browser adapter (keycloak-js) keeps the access / ID / refresh
4
+ * tokens in memory, and server adapters (keycloak-connect, NextAuth's Keycloak
5
+ * provider) keep them server-side or inside an encrypted cookie, so the token
6
+ * an integrator can hand the bridge is the access or ID token itself (Bearer
7
+ * header or the `exchangeMigrationBrowserSession` browser helper). The
8
+ * `KEYCLOAK_IDENTITY` cookie is signed with the realm's own HMAC secret and is
9
+ * never accepted.
10
+ *
11
+ * Access tokens live five minutes by default and nobody refreshes them after
12
+ * the switch, so a validly signed token is accepted (once) for a week past `exp`.
13
+ * Keycloak 16 and older serve under `/auth`: pass `base_url` as
14
+ * `https://sso.example.com/auth`.
15
+ */
16
+ export declare const KEYCLOAK_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KEYCLOAK_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * Keycloak. Its browser adapter (keycloak-js) keeps the access / ID / refresh
6
+ * tokens in memory, and server adapters (keycloak-connect, NextAuth's Keycloak
7
+ * provider) keep them server-side or inside an encrypted cookie, so the token
8
+ * an integrator can hand the bridge is the access or ID token itself (Bearer
9
+ * header or the `exchangeMigrationBrowserSession` browser helper). The
10
+ * `KEYCLOAK_IDENTITY` cookie is signed with the realm's own HMAC secret and is
11
+ * never accepted.
12
+ *
13
+ * Access tokens live five minutes by default and nobody refreshes them after
14
+ * the switch, so a validly signed token is accepted (once) for a week past `exp`.
15
+ * Keycloak 16 and older serve under `/auth`: pass `base_url` as
16
+ * `https://sso.example.com/auth`.
17
+ */
18
+ exports.KEYCLOAK_BRIDGE_PRESETS = [
19
+ {
20
+ id: 'keycloak',
21
+ label: 'Keycloak (access or ID token)',
22
+ mode: 'jwt',
23
+ vars: { base_url: 'Keycloak base URL (https://sso.example.com; add /auth for Keycloak 16 and older)', realm: 'Realm name' },
24
+ jwt: {
25
+ issuer: '{base_url}/realms/{realm}',
26
+ keysUrl: '{base_url}/realms/{realm}/protocol/openid-connect/certs',
27
+ algorithms: ['RS256', 'RS384', 'RS512', 'PS256', 'ES256', 'ES384'],
28
+ // sub = the Keycloak user id (what the realm export keys users by); sid = the SSO session id.
29
+ claims: { subject: 'sub', email: 'email', emailVerified: 'email_verified', name: 'name', sessionKey: 'sid', mfa: 'acr:2' },
30
+ expiredGraceSeconds: 7 * 24 * 3600,
31
+ },
32
+ cookies: [],
33
+ bearer: true,
34
+ notes: 'Use the access token or the ID token (both carry sub, email, sid). Realm keys must publish a signing algorithm from the list (the default RS256 does; HS512 keys are never accepted). A step-up login raises the acr claim to 2 when you map levels of authentication to "2"; otherwise an MFA sign-in is not marked.',
35
+ },
36
+ ];
37
+ //# sourceMappingURL=keycloak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keycloak.js","sourceRoot":"","sources":["../../src/migration-presets-g4/keycloak.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;GAaG;AACU,QAAA,uBAAuB,GAAqC;IACvE;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,+BAA+B;QACtC,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,kFAAkF,EAAE,KAAK,EAAE,YAAY,EAAE;QAC3H,GAAG,EAAE;YACH,MAAM,EAAE,2BAA2B;YACnC,OAAO,EAAE,yDAAyD;YAClE,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAClE,8FAA8F;YAC9F,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC1H,mBAAmB,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;SACnC;QACD,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,uTAAuT;KAC1T;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ /**
3
+ * Logto. The tenant's OIDC issuer is `{endpoint}/oidc` (`https://auth.example.com/oidc`,
4
+ * `https://abc123.logto.app/oidc` on Logto Cloud); its signing keys are at
5
+ * `/oidc/jwks` and default to ES384. The token to exchange is the application's
6
+ * ID token (`aud` = the Logto application id) — what `@logto/*` SDKs keep in
7
+ * the app's own session. The SDKs store that session encrypted with the app's
8
+ * cookie secret (or in the server's session store), so no cookie is named here:
9
+ * hand the middleware a token extractor that opens the session locally, or send
10
+ * the ID token as a bearer token from the client.
11
+ */
12
+ export declare const LOGTO_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOGTO_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * Logto. The tenant's OIDC issuer is `{endpoint}/oidc` (`https://auth.example.com/oidc`,
6
+ * `https://abc123.logto.app/oidc` on Logto Cloud); its signing keys are at
7
+ * `/oidc/jwks` and default to ES384. The token to exchange is the application's
8
+ * ID token (`aud` = the Logto application id) — what `@logto/*` SDKs keep in
9
+ * the app's own session. The SDKs store that session encrypted with the app's
10
+ * cookie secret (or in the server's session store), so no cookie is named here:
11
+ * hand the middleware a token extractor that opens the session locally, or send
12
+ * the ID token as a bearer token from the client.
13
+ */
14
+ exports.LOGTO_BRIDGE_PRESETS = [
15
+ {
16
+ id: 'logto',
17
+ label: 'Logto',
18
+ mode: 'jwt',
19
+ vars: {
20
+ base_url: 'Your Logto endpoint (https://auth.example.com or https://abc123.logto.app)',
21
+ client_id: 'The id of your Logto application (the audience of its ID tokens)',
22
+ },
23
+ jwt: {
24
+ issuer: '{base_url}/oidc',
25
+ keysUrl: '{base_url}/oidc/jwks',
26
+ audience: ['{client_id}'],
27
+ algorithms: ['ES384', 'ES256', 'RS256', 'PS256', 'EdDSA'],
28
+ claims: { subject: 'sub', email: 'email', emailVerified: 'email_verified', name: 'name', sessionKey: 'sid' },
29
+ },
30
+ cookies: [],
31
+ bearer: true,
32
+ notes: 'Exchange the ID token. Logto SDK sessions are encrypted with your cookie secret (or kept in your session store): pass the middleware a token extractor that reads the idToken from the session locally. API access tokens carry the API resource as their audience and are not accepted here.',
33
+ },
34
+ ];
35
+ //# sourceMappingURL=logto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logto.js","sourceRoot":"","sources":["../../src/migration-presets-g4/logto.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;GASG;AACU,QAAA,oBAAoB,GAAqC;IACpE;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,KAAK;QACX,IAAI,EAAE;YACJ,QAAQ,EAAE,4EAA4E;YACtF,SAAS,EAAE,kEAAkE;SAC9E;QACD,GAAG,EAAE;YACH,MAAM,EAAE,iBAAiB;YACzB,OAAO,EAAE,sBAAsB;YAC/B,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YACzD,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;SAC7G;QACD,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,+RAA+R;KAClS;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ export declare const ORY_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORY_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * Ory Kratos bridge presets. A Kratos session is opaque: the token (or the
6
+ * cookie that wraps it, sealed with `secrets.cookie`) says nothing offline. So
7
+ * there are two ways to recognise one:
8
+ *
9
+ * - `ory` (session_table): the session tokens (`ory_st_…`, the
10
+ * `X-Session-Token` / bearer value API-flow clients hold) imported from a
11
+ * database export, looked up by sha256. Self-hosted only; Ory Network has no
12
+ * database access.
13
+ * - `ory_whoami` / `ory_whoami_token` (remote): Atlas asks Kratos itself,
14
+ * `GET /sessions/whoami`, with the cookie (or the session token) the browser
15
+ * presented. Works on self-hosted Kratos and Ory Network, needs Kratos
16
+ * running (and reachable from Atlas) for the bridge window, and needs no
17
+ * export. The identity id in the answer is the user id the export keyed by.
18
+ *
19
+ * Kratos answers 401 for an unknown / expired session and 403
20
+ * (`session_aal2_required`) when a second factor is still owed: both are
21
+ * refusals, so a half-authenticated session never becomes an Atlas session.
22
+ * The remote preset reads the session's own identity: `identity.id`,
23
+ * `identity.traits.email` (the common schema; others rely on the imported
24
+ * user's email) and the first verifiable address.
25
+ */
26
+ const WHOAMI_NOTES = 'Kratos stays up for the bridge window: Atlas calls its /sessions/whoami with the presented session. Point base_url at the public URL (https://<slug>.projects.oryapis.com on Ory Network). A session that still owes a second factor (aal2) is refused.';
27
+ const IDENTITY = {
28
+ subjectPath: 'identity.id',
29
+ emailPath: 'identity.traits.email',
30
+ emailVerifiedPath: 'identity.verifiable_addresses.0.verified',
31
+ namePath: 'identity.traits.name',
32
+ };
33
+ exports.ORY_BRIDGE_PRESETS = [
34
+ {
35
+ id: 'ory',
36
+ label: 'Ory Kratos (session tokens imported from the database)',
37
+ mode: 'session_table',
38
+ // The browser cookie is sealed with Kratos' cookie secret and cannot be hashed
39
+ // to a stored token: only the raw session token (ory_st_…) matches.
40
+ cookies: [],
41
+ bearer: true,
42
+ notes: 'Matches the session tokens (ory_st_…) from a database export: API-flow clients (native apps, SPAs holding the token) send them as a bearer token. Browser cookies are sealed with Kratos\' cookie secret, so cookie sessions use the ory_whoami preset. If your app keeps the token in a cookie of its own, pass that name as cookieNames to the middleware.',
43
+ },
44
+ {
45
+ id: 'ory_whoami',
46
+ label: 'Ory Kratos (session cookie, checked with Kratos)',
47
+ mode: 'remote',
48
+ vars: {
49
+ base_url: 'Kratos public URL (https://auth.example.com, or https://<project slug>.projects.oryapis.com)',
50
+ cookie_name: 'The session cookie name (ory_kratos_session; ory_session_<project slug> on Ory Network)',
51
+ },
52
+ remote: { url: '{base_url}/sessions/whoami', method: 'GET', headers: { cookie: '{cookie_name}={token}' }, ...IDENTITY },
53
+ cookies: ['ory_kratos_session', 'ory_session_*'],
54
+ notes: `${WHOAMI_NOTES} The cookie must reach your app: serve it on a domain your app shares (Ory Network custom domain or Kratos behind your domain).`,
55
+ },
56
+ {
57
+ id: 'ory_whoami_token',
58
+ label: 'Ory Kratos (session token, checked with Kratos)',
59
+ mode: 'remote',
60
+ vars: { base_url: 'Kratos public URL (https://auth.example.com, or https://<project slug>.projects.oryapis.com)' },
61
+ remote: { url: '{base_url}/sessions/whoami', method: 'GET', headers: { 'x-session-token': '{token}' }, ...IDENTITY },
62
+ cookies: [],
63
+ bearer: true,
64
+ notes: WHOAMI_NOTES,
65
+ },
66
+ ];
67
+ //# sourceMappingURL=ory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ory.js","sourceRoot":"","sources":["../../src/migration-presets-g4/ory.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,YAAY,GAChB,yPAAyP,CAAC;AAE5P,MAAM,QAAQ,GAAG;IACf,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,uBAAuB;IAClC,iBAAiB,EAAE,0CAA0C;IAC7D,QAAQ,EAAE,sBAAsB;CACjC,CAAC;AAEW,QAAA,kBAAkB,GAAqC;IAClE;QACE,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,wDAAwD;QAC/D,IAAI,EAAE,eAAe;QACrB,+EAA+E;QAC/E,oEAAoE;QACpE,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,8VAA8V;KACjW;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,kDAAkD;QACzD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,QAAQ,EAAE,8FAA8F;YACxG,WAAW,EAAE,yFAAyF;SACvG;QACD,MAAM,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,uBAAuB,EAAE,EAAE,GAAG,QAAQ,EAAE;QACvH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QAChD,KAAK,EAAE,GAAG,YAAY,iIAAiI;KACxJ;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,KAAK,EAAE,iDAAiD;QACxD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,EAAE,QAAQ,EAAE,8FAA8F,EAAE;QAClH,MAAM,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,GAAG,QAAQ,EAAE;QACpH,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,YAAY;KACpB;CACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ /**
3
+ * SuperTokens. The session's access token is a JWT signed with the core's
4
+ * dynamic keys; the backend SDK serves their public half at
5
+ * `{api_domain}{api_base_path}/jwt/jwks.json` (the core also at
6
+ * `/.well-known/jwks.json`) and stamps `iss` with `{api_domain}{api_base_path}`.
7
+ * The `sub` is the SuperTokens user id (what the export imports as the source
8
+ * id), `sessionHandle` identifies the session, so every token of one old
9
+ * session exchanges once. The access token lives an hour and is refreshed by
10
+ * the SuperTokens frontend SDK, which stops running after the switch: a token
11
+ * up to a week past `exp` is still accepted (each exchanges once).
12
+ */
13
+ export declare const SUPERTOKENS_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPERTOKENS_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * SuperTokens. The session's access token is a JWT signed with the core's
6
+ * dynamic keys; the backend SDK serves their public half at
7
+ * `{api_domain}{api_base_path}/jwt/jwks.json` (the core also at
8
+ * `/.well-known/jwks.json`) and stamps `iss` with `{api_domain}{api_base_path}`.
9
+ * The `sub` is the SuperTokens user id (what the export imports as the source
10
+ * id), `sessionHandle` identifies the session, so every token of one old
11
+ * session exchanges once. The access token lives an hour and is refreshed by
12
+ * the SuperTokens frontend SDK, which stops running after the switch: a token
13
+ * up to a week past `exp` is still accepted (each exchanges once).
14
+ */
15
+ exports.SUPERTOKENS_BRIDGE_PRESETS = [
16
+ {
17
+ id: 'supertokens',
18
+ label: 'SuperTokens',
19
+ mode: 'jwt',
20
+ vars: { base_url: 'Your SuperTokens API domain (https://api.example.com), the apiDomain of your backend config' },
21
+ defaults: { api_base_path: 'auth' },
22
+ jwt: {
23
+ issuer: '{base_url}/{api_base_path}',
24
+ keysUrl: '{base_url}/{api_base_path}/jwt/jwks.json',
25
+ algorithms: ['RS256'],
26
+ claims: { subject: 'sub', sessionKey: 'sessionHandle' },
27
+ expiredGraceSeconds: 7 * 24 * 3600,
28
+ },
29
+ cookies: ['sAccessToken'],
30
+ clearCookies: ['sAccessToken', 'sRefreshToken', 'sIdRefreshToken', 'sFrontToken'],
31
+ bearer: true,
32
+ notes: 'Pass api_base_path (your apiBasePath without slashes, default auth) when you changed it. With header-based sessions send the access token as `Authorization: Bearer`. SuperTokens access tokens carry no email: the user is matched by the imported SuperTokens user id, so import users first.',
33
+ },
34
+ ];
35
+ //# sourceMappingURL=supertokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supertokens.js","sourceRoot":"","sources":["../../src/migration-presets-g4/supertokens.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACU,QAAA,0BAA0B,GAAqC;IAC1E;QACE,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,QAAQ,EAAE,6FAA6F,EAAE;QACjH,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE;QACnC,GAAG,EAAE;YACH,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,0CAA0C;YACnD,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE;YACvD,mBAAmB,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;SACnC;QACD,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,YAAY,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,CAAC;QACjF,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,iSAAiS;KACpS;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { MigrationBridgePreset } from '../migration-presets';
2
+ export declare const ZITADEL_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZITADEL_BRIDGE_PRESETS = void 0;
4
+ /**
5
+ * ZITADEL bridge preset (ZITADEL Cloud, self-hosted, custom domains). ZITADEL
6
+ * signs ID tokens, and access tokens of applications set to the JWT token
7
+ * type, with RS256 keys it publishes at `{issuer}/oauth/v2/keys`. The `iss` is
8
+ * the instance URL (`https://<instance>.zitadel.cloud`, or your custom domain
9
+ * exactly as users reach it), `sub` the ZITADEL user id, `sid` the session id.
10
+ * `amr` lists `mfa` after a second factor.
11
+ *
12
+ * Opaque access tokens (ZITADEL's default for new applications) cannot be
13
+ * verified offline: exchange the ID token, or switch the application's access
14
+ * token type to JWT.
15
+ */
16
+ const WEEK = 7 * 24 * 3600;
17
+ exports.ZITADEL_BRIDGE_PRESETS = [
18
+ {
19
+ id: 'zitadel',
20
+ label: 'ZITADEL (ID tokens and JWT access tokens)',
21
+ mode: 'jwt',
22
+ vars: { issuer: 'Your ZITADEL URL, exactly as the iss claim has it (https://<instance>.zitadel.cloud, or your custom domain)' },
23
+ jwt: {
24
+ issuer: '{issuer}',
25
+ keysUrl: '{issuer}/oauth/v2/keys',
26
+ algorithms: ['RS256', 'RS384', 'RS512', 'ES256'],
27
+ claims: { subject: 'sub', email: 'email', emailVerified: 'email_verified', name: 'name', sessionKey: 'sid', mfa: 'amr:mfa' },
28
+ // Tokens live hours and the OIDC client that refreshed them is gone after the switch.
29
+ expiredGraceSeconds: WEEK,
30
+ },
31
+ cookies: [],
32
+ bearer: true,
33
+ notes: 'Send the ID token (or a JWT access token) as an Authorization: Bearer header. Browser OIDC clients (oidc-client-ts, react-oidc-context) keep tokens in browser storage, so the browser has to send one request with it before they are cleared; server sessions (Auth.js, express-session) hold the ID token you can pass to the middleware with extractToken. Application access tokens are opaque unless the application is set to the JWT token type.',
34
+ },
35
+ ];
36
+ //# sourceMappingURL=zitadel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zitadel.js","sourceRoot":"","sources":["../../src/migration-presets-g4/zitadel.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AAEH,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAEd,QAAA,sBAAsB,GAAqC;IACtE;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,2CAA2C;QAClD,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,MAAM,EAAE,6GAA6G,EAAE;QAC/H,GAAG,EAAE;YACH,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE,wBAAwB;YACjC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAChD,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE;YAC5H,sFAAsF;YACtF,mBAAmB,EAAE,IAAI;SAC1B;QACD,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EACH,0bAA0b;KAC7b;CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { MigrationBridgePreset } from './migration-presets';
2
+ /**
3
+ * Bridge presets for the open-source identity providers — Keycloak, Ory
4
+ * (Kratos, Hydra, Ory Network), ZITADEL, Logto, SuperTokens, authentik,
5
+ * FusionAuth and Hanko — one module per vendor under ./migration-presets-g4/,
6
+ * each checked against the vendor's token documentation and a fixture token.
7
+ * Registered (replacing the starters) at the end of migration-presets.ts; the
8
+ * modules import only types from there, so there is no import cycle at runtime.
9
+ */
10
+ export declare const G4_BRIDGE_PRESETS: readonly MigrationBridgePreset[];
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.G4_BRIDGE_PRESETS = void 0;
4
+ const authentik_1 = require("./migration-presets-g4/authentik");
5
+ const fusionauth_1 = require("./migration-presets-g4/fusionauth");
6
+ const hanko_1 = require("./migration-presets-g4/hanko");
7
+ const keycloak_1 = require("./migration-presets-g4/keycloak");
8
+ const logto_1 = require("./migration-presets-g4/logto");
9
+ const ory_1 = require("./migration-presets-g4/ory");
10
+ const supertokens_1 = require("./migration-presets-g4/supertokens");
11
+ const zitadel_1 = require("./migration-presets-g4/zitadel");
12
+ /**
13
+ * Bridge presets for the open-source identity providers — Keycloak, Ory
14
+ * (Kratos, Hydra, Ory Network), ZITADEL, Logto, SuperTokens, authentik,
15
+ * FusionAuth and Hanko — one module per vendor under ./migration-presets-g4/,
16
+ * each checked against the vendor's token documentation and a fixture token.
17
+ * Registered (replacing the starters) at the end of migration-presets.ts; the
18
+ * modules import only types from there, so there is no import cycle at runtime.
19
+ */
20
+ exports.G4_BRIDGE_PRESETS = [
21
+ ...keycloak_1.KEYCLOAK_BRIDGE_PRESETS,
22
+ ...ory_1.ORY_BRIDGE_PRESETS,
23
+ ...zitadel_1.ZITADEL_BRIDGE_PRESETS,
24
+ ...logto_1.LOGTO_BRIDGE_PRESETS,
25
+ ...supertokens_1.SUPERTOKENS_BRIDGE_PRESETS,
26
+ ...authentik_1.AUTHENTIK_BRIDGE_PRESETS,
27
+ ...fusionauth_1.FUSIONAUTH_BRIDGE_PRESETS,
28
+ ...hanko_1.HANKO_BRIDGE_PRESETS,
29
+ ];
30
+ //# sourceMappingURL=migration-presets-g4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-presets-g4.js","sourceRoot":"","sources":["../src/migration-presets-g4.ts"],"names":[],"mappings":";;;AACA,gEAA4E;AAC5E,kEAA8E;AAC9E,wDAAoE;AACpE,8DAA0E;AAC1E,wDAAoE;AACpE,oDAAgE;AAChE,oEAAgF;AAChF,4DAAwE;AAExE;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAqC;IACjE,GAAG,kCAAuB;IAC1B,GAAG,wBAAkB;IACrB,GAAG,gCAAsB;IACzB,GAAG,4BAAoB;IACvB,GAAG,wCAA0B;IAC7B,GAAG,oCAAwB;IAC3B,GAAG,sCAAyB;IAC5B,GAAG,4BAAoB;CACxB,CAAC"}