@ctx-core/auth0-ui 10.0.122 → 10.0.123

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 (70) hide show
  1. package/.swcrc +10 -0
  2. package/CHANGELOG.md +16 -0
  3. package/dist/auth0_ui_Ctx.js +2 -1
  4. package/dist/auth0_ui_Ctx.js.map +1 -1
  5. package/dist/auth0_ui_ctx_I.generated.js +4 -1
  6. package/dist/auth0_ui_ctx_I.generated.js.map +1 -1
  7. package/dist/auth0_ui_ctx_key.js +1 -0
  8. package/dist/auth0_ui_ctx_key.js.map +1 -1
  9. package/dist/auth_script_html_.js +2 -1
  10. package/dist/auth_script_html_.js.map +1 -1
  11. package/dist/getContext_auth0_ui_ctx.js +1 -0
  12. package/dist/getContext_auth0_ui_ctx.js.map +1 -1
  13. package/dist/{index.d.ts → index.browser.js} +2 -2
  14. package/dist/index.browser.js.map +1 -0
  15. package/dist/index.js +1 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/node/index.js +1 -0
  18. package/dist/node/index.js.map +1 -1
  19. package/dist/node/jwks_cert__b.js +4 -2
  20. package/dist/node/jwks_cert__b.js.map +1 -1
  21. package/dist/node/jwks_x5c__b.js +5 -4
  22. package/dist/node/jwks_x5c__b.js.map +1 -1
  23. package/dist/node/jwt_token_decoded__b.js +2 -1
  24. package/dist/node/jwt_token_decoded__b.js.map +1 -1
  25. package/dist/node/koa_jwt_token_decoded__b.js +4 -2
  26. package/dist/node/koa_jwt_token_decoded__b.js.map +1 -1
  27. package/dist/node/verify_jwt_email__b.js +2 -1
  28. package/dist/node/verify_jwt_email__b.js.map +1 -1
  29. package/dist/node/verify_jwt_user_id__b.js +2 -1
  30. package/dist/node/verify_jwt_user_id__b.js.map +1 -1
  31. package/dist/ui/Auth0.svelte +169 -0
  32. package/dist/ui/Auth0_Change_Password_Form.svelte +99 -0
  33. package/dist/ui/Auth0_Dialog_Close.svelte +10 -0
  34. package/dist/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +10 -0
  35. package/dist/ui/Auth0_Forgot_Password_Form.svelte +68 -0
  36. package/dist/ui/Auth0_Loggedin_If.svelte +14 -0
  37. package/dist/ui/Auth0_Login_Form.svelte +89 -0
  38. package/dist/ui/Auth0_Signup_Form.svelte +121 -0
  39. package/dist/ui/Auth0_c.js +53 -37
  40. package/dist/ui/Auth0_c.js.map +1 -1
  41. package/dist/ui/index.js +17 -8
  42. package/dist/ui/index.js.map +1 -1
  43. package/package.json +20 -21
  44. package/dist/auth0_ui_Ctx.d.ts +0 -9
  45. package/dist/auth0_ui_ctx_I.generated.d.ts +0 -14
  46. package/dist/auth0_ui_ctx_key.d.ts +0 -1
  47. package/dist/auth_script_html_.d.ts +0 -2
  48. package/dist/browser/auth0_ui_ctx_key.d.ts +0 -1
  49. package/dist/browser/auth0_ui_ctx_key.js +0 -2
  50. package/dist/browser/auth0_ui_ctx_key.js.map +0 -1
  51. package/dist/browser/auth_script_html_.d.ts +0 -2
  52. package/dist/browser/auth_script_html_.js +0 -34
  53. package/dist/browser/auth_script_html_.js.map +0 -1
  54. package/dist/browser/getContext_auth0_ui_ctx.d.ts +0 -1
  55. package/dist/browser/getContext_auth0_ui_ctx.js +0 -6
  56. package/dist/browser/getContext_auth0_ui_ctx.js.map +0 -1
  57. package/dist/browser/index.d.ts +0 -3
  58. package/dist/browser/index.js +0 -4
  59. package/dist/browser/index.js.map +0 -1
  60. package/dist/getContext_auth0_ui_ctx.d.ts +0 -1
  61. package/dist/index.cjs +0 -1
  62. package/dist/node/index.d.ts +0 -6
  63. package/dist/node/jwks_cert__b.d.ts +0 -6
  64. package/dist/node/jwks_x5c__b.d.ts +0 -6
  65. package/dist/node/jwt_token_decoded__b.d.ts +0 -6
  66. package/dist/node/koa_jwt_token_decoded__b.d.ts +0 -7
  67. package/dist/node/verify_jwt_email__b.d.ts +0 -6
  68. package/dist/node/verify_jwt_user_id__b.d.ts +0 -6
  69. package/dist/ui/Auth0_c.d.ts +0 -55
  70. package/dist/ui/index.d.ts +0 -9
package/.swcrc ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "jsc": {
3
+ "target": "es2019",
4
+ "parser": {
5
+ "syntax": "typescript",
6
+ "tsx": true,
7
+ "dynamicImport": true
8
+ }
9
+ }
10
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ctx-core/auth0-ui
2
2
 
3
+ ## 10.0.123
4
+
5
+ ### Patch Changes
6
+
7
+ - compile using swc
8
+ - Updated dependencies
9
+ - @ctx-core/auth0@25.0.103
10
+ - @ctx-core/auth0-management@6.0.101
11
+ - @ctx-core/dialog@15.0.78
12
+ - @ctx-core/dom@11.0.30
13
+ - @ctx-core/error@11.0.18
14
+ - @ctx-core/fetch@11.0.80
15
+ - @ctx-core/jwt@10.0.27
16
+ - @ctx-core/object@21.0.22
17
+ - @ctx-core/store@27.0.36
18
+
3
19
  ## 10.0.122
4
20
 
5
21
  ### Patch Changes
@@ -1,2 +1,3 @@
1
- export {};
1
+ export { };
2
+
2
3
  //# sourceMappingURL=auth0_ui_Ctx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_ui_Ctx.js","sourceRoot":"","sources":["../src/auth0_ui_Ctx.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/auth0_ui_Ctx.ts"],"sourcesContent":["import type { auth0_body__T, auth0_Ctx, password_realm_body__T } from '@ctx-core/auth0'\nimport type { auth0_ui_ctx_I } from './auth0_ui_ctx_I.generated.js'\nimport type {\n\tlogin_data_password_realm_body_I, signup_data_password_realm_body_I\n} from './ui/Auth0_c.js'\nexport interface auth0_ui_Ctx extends auth0_ui_ctx_I, auth0_Ctx {\n\tlogin_auth0_body_:auth0_body__T<login_data_password_realm_body_I>\n\tlogin_password_realm_body_:password_realm_body__T<login_data_password_realm_body_I>\n\tsignup_auth0_body_:auth0_body__T<signup_data_password_realm_body_I>\n\tsignup_password_realm_body_fn:password_realm_body__T<signup_data_password_realm_body_I>\n}\n"],"names":[],"mappings":"AAAA,MAAM"}
@@ -1,2 +1,5 @@
1
- export {};
1
+ /*
2
+ * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools
3
+ */ export { };
4
+
2
5
  //# sourceMappingURL=auth0_ui_ctx_I.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_ui_ctx_I.generated.js","sourceRoot":"","sources":["../src/auth0_ui_ctx_I.generated.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/auth0_ui_ctx_I.generated.ts"],"sourcesContent":["/*\n * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools\n*/\nimport type { jwks_cert__T } from './node/jwks_cert__b.js'\nimport type { jwks_x5c__T } from './node/jwks_x5c__b.js'\nimport type { jwt_token_decoded__T } from './node/jwt_token_decoded__b.js'\nimport type { koa_jwt_token_decoded__T } from './node/koa_jwt_token_decoded__b.js'\nimport type { verify_jwt_email__T } from './node/verify_jwt_email__b.js'\nimport type { verify_jwt_user_id__T } from './node/verify_jwt_user_id__b.js'\nexport interface auth0_ui_ctx_I {\n\tjwks_cert_?:jwks_cert__T\n\tjwks_x5c_?:jwks_x5c__T\n\tjwt_token_decoded_?:jwt_token_decoded__T\n\tkoa_jwt_token_decoded_?:koa_jwt_token_decoded__T\n\tverify_jwt_email_?:verify_jwt_email__T\n\tverify_jwt_user_id_?:verify_jwt_user_id__T\n}"],"names":[],"mappings":"AAAA,EAEE,AAFF;;AAEE,AAFF,EAEE,CACF,MAAM"}
@@ -1,2 +1,3 @@
1
1
  export const auth0_ui_ctx_key = Symbol('auth0_ui_ctx');
2
+
2
3
  //# sourceMappingURL=auth0_ui_ctx_key.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_ui_ctx_key.js","sourceRoot":"","sources":["../src/auth0_ui_ctx_key.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA"}
1
+ {"version":3,"sources":["../src/auth0_ui_ctx_key.ts"],"sourcesContent":["export const auth0_ui_ctx_key = Symbol('auth0_ui_ctx')\n"],"names":["auth0_ui_ctx_key","Symbol"],"mappings":"AAAA,MAAM,CAAC,KAAK,CAACA,gBAAgB,GAAGC,MAAM,CAAC,CAAc"}
@@ -30,5 +30,6 @@ export function auth_script_html_() {
30
30
  </script>
31
31
  `.trim();
32
32
  }
33
- export { auth_script_html_ as _auth_script_html, auth_script_html_ as _html__script__auth, };
33
+ export { auth_script_html_ as _auth_script_html, auth_script_html_ as _html__script__auth, };
34
+
34
35
  //# sourceMappingURL=auth_script_html_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth_script_html_.js","sourceRoot":"","sources":["../src/auth_script_html_.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BN,CAAC,IAAI,EAAE,CAAA;AACT,CAAC;AACD,OAAO,EACN,iBAAiB,IAAI,iBAAiB,EACtC,iBAAiB,IAAI,mBAAmB,GACxC,CAAA"}
1
+ {"version":3,"sources":["../src/auth_script_html_.ts"],"sourcesContent":["export function auth_script_html_():string {\n\treturn `\n<script>\n\t(function() {\n\t\tvar location = window.location\n\t\tvar search = location.search\n\t\tvar search_values = _values(search.substr(1))\n\t\tvar hash = location.hash\n\t\tvar auth0_token = _values(hash.substr(1))\n\t\tvar auth0_token_json = JSON.stringify(auth0_token)\n\t\tvar redirect_url =\n\t\t\t\t\tsearch_values\n\t\t\t\t\t&& search_values.redirect_url\n\t\tlocalStorage.setItem('auth0_token_json', auth0_token_json)\n\t\tif (redirect_url) {\n\t\t\tlocation.href = redirect_url\n\t\t}\n\t\tfunction _values(string) {\n\t\t\tvar segments = string.split('&')\n\t\t\tvar values = {}\n\t\t\tfor (var i=0; i < segments.length; i++) {\n\t\t\t\tvar pair = segments[i].split('=')\n\t\t\t\tvar key = decodeURIComponent(pair[0])\n\t\t\t\tvar value = decodeURIComponent(pair[1])\n\t\t\t\tvalues[key] = value\n\t\t\t}\n\t\t\treturn values\n\t\t}\n\t})()\n</script>\n\t`.trim()\n}\nexport {\n\tauth_script_html_ as _auth_script_html,\n\tauth_script_html_ as _html__script__auth,\n}\n"],"names":["auth_script_html_","trim","_auth_script_html","_html__script__auth"],"mappings":"AAAA,MAAM,UAAUA,iBAAiB,GAAU,CAAC;IAC3C,MAAM,EAAE,uwBA6BR,EAAEC,IAAI;AACP,CAAC;AACD,MAAM,GACLD,iBAAiB,IAAIE,iBAAiB,EACtCF,iBAAiB,IAAIG,mBAAmB"}
@@ -3,4 +3,5 @@ import { auth0_ui_ctx_key } from './auth0_ui_ctx_key.js';
3
3
  export function getContext_auth0_ui_ctx() {
4
4
  return getContext(auth0_ui_ctx_key);
5
5
  }
6
+
6
7
  //# sourceMappingURL=getContext_auth0_ui_ctx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getContext_auth0_ui_ctx.js","sourceRoot":"","sources":["../src/getContext_auth0_ui_ctx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,MAAM,UAAU,uBAAuB;IACrC,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAA;AACrC,CAAC"}
1
+ {"version":3,"sources":["../src/getContext_auth0_ui_ctx.ts"],"sourcesContent":["import { getContext } from 'svelte'\nimport { auth0_ui_ctx_key } from './auth0_ui_ctx_key.js'\nexport function getContext_auth0_ui_ctx() {\n return getContext(auth0_ui_ctx_key)\n}\n"],"names":["getContext","auth0_ui_ctx_key","getContext_auth0_ui_ctx"],"mappings":"AAAA,MAAM,GAAGA,UAAU,QAAQ,CAAQ;AACnC,MAAM,GAAGC,gBAAgB,QAAQ,CAAuB;AACxD,MAAM,UAAUC,uBAAuB,GAAG,CAAC;IACzC,MAAM,CAACF,UAAU,CAACC,gBAAgB;AACpC,CAAC"}
@@ -2,5 +2,5 @@ export * from './auth0_ui_Ctx.js';
2
2
  export * from './auth0_ui_ctx_key.js';
3
3
  export * from './auth_script_html_.js';
4
4
  export * from './getContext_auth0_ui_ctx.js';
5
- export * from './node/index.js';
6
- export * from './ui/index.js';
5
+
6
+ //# sourceMappingURL=index.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.browser.js"],"sourcesContent":["export * from './auth0_ui_Ctx.js'\nexport * from './auth0_ui_ctx_key.js'\nexport * from './auth_script_html_.js'\nexport * from './getContext_auth0_ui_ctx.js'\n"],"names":[],"mappings":"cAAc,CAAmB;cACnB,CAAuB;cACvB,CAAwB;cACxB,CAA8B"}
package/dist/index.js CHANGED
@@ -4,4 +4,5 @@ export * from './auth_script_html_.js';
4
4
  export * from './getContext_auth0_ui_ctx.js';
5
5
  export * from './node/index.js';
6
6
  export * from './ui/index.js';
7
+
7
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './auth0_ui_Ctx.js'\nexport * from './auth0_ui_ctx_key.js'\nexport * from './auth_script_html_.js'\nexport * from './getContext_auth0_ui_ctx.js'\nexport * from './node/index.js'\nexport * from './ui/index.js'\n"],"names":[],"mappings":"cAAc,CAAmB;cACnB,CAAuB;cACvB,CAAwB;cACxB,CAA8B;cAC9B,CAAiB;cACjB,CAAe"}
@@ -4,4 +4,5 @@ export * from './jwt_token_decoded__b.js';
4
4
  export * from './koa_jwt_token_decoded__b.js';
5
5
  export * from './verify_jwt_email__b.js';
6
6
  export * from './verify_jwt_user_id__b.js';
7
+
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export * from './jwks_cert__b.js'\nexport * from './jwks_x5c__b.js'\nexport * from './jwt_token_decoded__b.js'\nexport * from './koa_jwt_token_decoded__b.js'\nexport * from './verify_jwt_email__b.js'\nexport * from './verify_jwt_user_id__b.js'\n"],"names":[],"mappings":"cAAc,CAAmB;cACnB,CAAkB;cAClB,CAA2B;cAC3B,CAA+B;cAC/B,CAA0B;cAC1B,CAA4B"}
@@ -1,17 +1,19 @@
1
1
  import { be_ } from '@ctx-core/object';
2
2
  import { jwks_x5c__b } from './jwks_x5c__b.js';
3
3
  const key = 'jwks_cert_';
4
- export const jwks_cert__b = be_(key, ctx => {
4
+ export const jwks_cert__b = be_(key, (ctx)=>{
5
5
  const jwks_x5c_ = jwks_x5c__b(ctx);
6
6
  return jwks_cert_;
7
7
  async function jwks_cert_() {
8
8
  const jwks_x5c = await jwks_x5c_();
9
9
  const injwks_cert_fn = jwks_x5c[0];
10
- const jwks_cert = ['-----BEGIN CERTIFICATE-----',
10
+ const jwks_cert = [
11
+ '-----BEGIN CERTIFICATE-----',
11
12
  injwks_cert_fn,
12
13
  '-----END CERTIFICATE-----'
13
14
  ].join('\n');
14
15
  return jwks_cert;
15
16
  }
16
17
  });
18
+
17
19
  //# sourceMappingURL=jwks_cert__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwks_cert__b.js","sourceRoot":"","sources":["../../src/node/jwks_cert__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,GAAG,GAAG,YAAY,CAAA;AACxB,MAAM,CAAC,MAAM,YAAY,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IACrE,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IAClC,OAAO,UAA0B,CAAA;IACjC,KAAK,UAAU,UAAU;QACxB,MAAM,QAAQ,GAAG,MAAM,SAAS,EAAE,CAAA;QAClC,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;QAClC,MAAM,SAAS,GACd,CAAC,6BAA6B;YAC7B,cAAc;YACd,2BAA2B;SAC3B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACb,OAAO,SAAS,CAAA;IACjB,CAAC;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/jwks_cert__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { jwks_x5c__b } from './jwks_x5c__b.js'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nconst key = 'jwks_cert_'\nexport const jwks_cert__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst jwks_x5c_ = jwks_x5c__b(ctx)\n\treturn jwks_cert_ as jwks_cert__T\n\tasync function jwks_cert_() {\n\t\tconst jwks_x5c = await jwks_x5c_()\n\t\tconst injwks_cert_fn = jwks_x5c[0]\n\t\tconst jwks_cert =\n\t\t\t['-----BEGIN CERTIFICATE-----',\n\t\t\t\tinjwks_cert_fn,\n\t\t\t\t'-----END CERTIFICATE-----'\n\t\t\t].join('\\n')\n\t\treturn jwks_cert\n\t}\n})\nexport type jwks_cert__T = ()=>Promise<string>\n"],"names":["be_","jwks_x5c__b","key","jwks_cert__b","ctx","jwks_x5c_","jwks_cert_","jwks_x5c","injwks_cert_fn","jwks_cert","join"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAE9C,KAAK,CAACC,GAAG,GAAG,CAAY;AACxB,MAAM,CAAC,KAAK,CAACC,YAAY,GAA+BH,GAAG,CAACE,GAAG,GAAEE,GAAG,GAAE,CAAC;IACtE,KAAK,CAACC,SAAS,GAAGJ,WAAW,CAACG,GAAG;IACjC,MAAM,CAACE,UAAU;mBACFA,UAAU,GAAG,CAAC;QAC5B,KAAK,CAACC,QAAQ,GAAG,KAAK,CAACF,SAAS;QAChC,KAAK,CAACG,cAAc,GAAGD,QAAQ,CAAC,CAAC;QACjC,KAAK,CAACE,SAAS,GACd,CAAC;YAAA,CAA6B;YAC7BD,cAAc;YACd,CAA2B;QAC5B,CAAC,CAACE,IAAI,CAAC,CAAI;QACZ,MAAM,CAACD,SAAS;IACjB,CAAC;AACF,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { be_ } from '@ctx-core/object';
2
2
  import { throw__response__fetch } from '@ctx-core/fetch';
3
3
  import { get_jwks_json_b } from '@ctx-core/auth0';
4
- const key = 'jwks_x5c_';
5
- export const jwks_x5c__b = be_(key, ctx => {
4
+ const key1 = 'jwks_x5c_';
5
+ export const jwks_x5c__b = be_(key1, (ctx)=>{
6
6
  const get_jwks_json = get_jwks_json_b(ctx);
7
7
  return jwks_x5c_;
8
8
  async function jwks_x5c_() {
@@ -11,10 +11,11 @@ export const jwks_x5c__b = be_(key, ctx => {
11
11
  await throw__response__fetch(response);
12
12
  }
13
13
  const jwks_json = await response.json();
14
- const { keys } = jwks_json;
14
+ const { keys } = jwks_json;
15
15
  const key = keys[0];
16
- const { x5c } = key;
16
+ const { x5c } = key;
17
17
  return x5c;
18
18
  }
19
19
  });
20
+
20
21
  //# sourceMappingURL=jwks_x5c__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwks_x5c__b.js","sourceRoot":"","sources":["../../src/node/jwks_x5c__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,GAAG,GAAG,WAAW,CAAA;AACvB,MAAM,CAAC,MAAM,WAAW,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IACpE,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,SAAwB,CAAA;IAC/B,KAAK,UAAU,SAAS;QACvB,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,CAAA;QACtC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YACjB,MAAM,sBAAsB,CAAC,QAAQ,CAAC,CAAA;SACtC;QACD,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QACvC,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACnB,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;QACnB,OAAO,GAAG,CAAA;IACX,CAAC;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/jwks_x5c__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { throw__response__fetch } from '@ctx-core/fetch'\nimport { get_jwks_json_b } from '@ctx-core/auth0'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nconst key = 'jwks_x5c_'\nexport const jwks_x5c__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst get_jwks_json = get_jwks_json_b(ctx)\n\treturn jwks_x5c_ as jwks_x5c__T\n\tasync function jwks_x5c_() {\n\t\tconst response = await get_jwks_json()\n\t\tif (!response.ok) {\n\t\t\tawait throw__response__fetch(response)\n\t\t}\n\t\tconst jwks_json = await response.json()\n\t\tconst { keys } = jwks_json\n\t\tconst key = keys[0]\n\t\tconst { x5c } = key\n\t\treturn x5c\n\t}\n})\nexport type jwks_x5c__T = ()=>Promise<string>\n"],"names":["be_","throw__response__fetch","get_jwks_json_b","key","jwks_x5c__b","ctx","get_jwks_json","jwks_x5c_","response","ok","jwks_json","json","keys","x5c"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,sBAAsB,QAAQ,CAAiB;AACxD,MAAM,GAAGC,eAAe,QAAQ,CAAiB;AAEjD,KAAK,CAACC,IAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAA+BJ,GAAG,CAACG,IAAG,GAAEE,GAAG,GAAE,CAAC;IACrE,KAAK,CAACC,aAAa,GAAGJ,eAAe,CAACG,GAAG;IACzC,MAAM,CAACE,SAAS;mBACDA,SAAS,GAAG,CAAC;QAC3B,KAAK,CAACC,QAAQ,GAAG,KAAK,CAACF,aAAa;QACpC,EAAE,GAAGE,QAAQ,CAACC,EAAE,EAAE,CAAC;YAClB,KAAK,CAACR,sBAAsB,CAACO,QAAQ;QACtC,CAAC;QACD,KAAK,CAACE,SAAS,GAAG,KAAK,CAACF,QAAQ,CAACG,IAAI;QACrC,KAAK,CAAC,CAAC,CAACC,IAAI,EAAC,CAAC,GAAGF,SAAS;QAC1B,KAAK,CAACP,GAAG,GAAGS,IAAI,CAAC,CAAC;QAClB,KAAK,CAAC,CAAC,CAACC,GAAG,EAAC,CAAC,GAAGV,GAAG;QACnB,MAAM,CAACU,GAAG;IACX,CAAC;AACF,CAAC"}
@@ -2,7 +2,7 @@ import jwt from 'jsonwebtoken';
2
2
  import { be_ } from '@ctx-core/object';
3
3
  import { jwks_cert__b } from './jwks_cert__b.js';
4
4
  const key = 'jwt_token_decoded_';
5
- export const jwt_token_decoded__b = be_(key, ctx => {
5
+ export const jwt_token_decoded__b = be_(key, (ctx)=>{
6
6
  const jwks_cert_ = jwks_cert__b(ctx);
7
7
  return jwt_token_decoded_;
8
8
  async function jwt_token_decoded_(jwt_token) {
@@ -11,4 +11,5 @@ export const jwt_token_decoded__b = be_(key, ctx => {
11
11
  return auth0_token_decoded;
12
12
  }
13
13
  });
14
+
14
15
  //# sourceMappingURL=jwt_token_decoded__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwt_token_decoded__b.js","sourceRoot":"","sources":["../../src/node/jwt_token_decoded__b.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,cAAc,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,MAAM,GAAG,GAAG,oBAAoB,CAAA;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC7E,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;IACpC,OAAO,kBAA0C,CAAA;IACjD,KAAK,UAAU,kBAAkB,CAAC,SAAgB;QACjD,MAAM,SAAS,GAAG,MAAM,UAAU,EAAE,CAAA;QACpC,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAC5D,OAAO,mBAAmB,CAAA;IAC3B,CAAC;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/jwt_token_decoded__b.ts"],"sourcesContent":["import jwt from 'jsonwebtoken'\nimport { be_, B } from '@ctx-core/object'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nimport { jwks_cert__b } from './jwks_cert__b.js'\nconst key = 'jwt_token_decoded_'\nexport const jwt_token_decoded__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst jwks_cert_ = jwks_cert__b(ctx)\n\treturn jwt_token_decoded_ as jwt_token_decoded__T\n\tasync function jwt_token_decoded_(jwt_token:string):Promise<object|string> {\n\t\tconst jwks_cert = await jwks_cert_()\n\t\tconst auth0_token_decoded = jwt.verify(jwt_token, jwks_cert)\n\t\treturn auth0_token_decoded\n\t}\n})\nexport type jwt_token_decoded__T = (jwt_token:string)=>Promise<object|string>\n"],"names":["jwt","be_","jwks_cert__b","key","jwt_token_decoded__b","ctx","jwks_cert_","jwt_token_decoded_","jwt_token","jwks_cert","auth0_token_decoded","verify"],"mappings":"AAAA,MAAM,CAACA,GAAG,MAAM,CAAc;AAC9B,MAAM,GAAGC,GAAG,QAAW,CAAkB;AAEzC,MAAM,GAAGC,YAAY,QAAQ,CAAmB;AAChD,KAAK,CAACC,GAAG,GAAG,CAAoB;AAChC,MAAM,CAAC,KAAK,CAACC,oBAAoB,GAA+BH,GAAG,CAACE,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC9E,KAAK,CAACC,UAAU,GAAGJ,YAAY,CAACG,GAAG;IACnC,MAAM,CAACE,kBAAkB;mBACVA,kBAAkB,CAACC,SAAgB,EAAyB,CAAC;QAC3E,KAAK,CAACC,SAAS,GAAG,KAAK,CAACH,UAAU;QAClC,KAAK,CAACI,mBAAmB,GAAGV,GAAG,CAACW,MAAM,CAACH,SAAS,EAAEC,SAAS;QAC3D,MAAM,CAACC,mBAAmB;IAC3B,CAAC;AACF,CAAC"}
@@ -3,14 +3,16 @@ import { header_authorization_jwt_token_ } from '@ctx-core/jwt';
3
3
  import { throw_bad_credentials } from '@ctx-core/error';
4
4
  import { jwt_token_decoded__b } from './jwt_token_decoded__b.js';
5
5
  const key = 'koa_jwt_token_decoded_';
6
- export const koa_jwt_token_decoded__b = be_(key, ctx => {
6
+ export const koa_jwt_token_decoded__b = be_(key, (ctx)=>{
7
7
  const jwt_token_decoded_ = jwt_token_decoded__b(ctx);
8
8
  return async function koa_jwt_token_decoded_(authorization) {
9
9
  const jwt_token = header_authorization_jwt_token_(authorization);
10
10
  if (!jwt_token) {
11
- throw_bad_credentials({});
11
+ throw_bad_credentials({
12
+ });
12
13
  }
13
14
  return await jwt_token_decoded_(jwt_token);
14
15
  };
15
16
  });
17
+
16
18
  //# sourceMappingURL=koa_jwt_token_decoded__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"koa_jwt_token_decoded__b.js","sourceRoot":"","sources":["../../src/node/koa_jwt_token_decoded__b.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAe,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAGpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,MAAM,GAAG,GAAG,wBAAwB,CAAA;AACpC,MAAM,CAAC,MAAM,wBAAwB,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IACjF,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAA;IACpD,OAAO,KAAK,UAAU,sBAAsB,CAAC,aAA4B;QACxE,MAAM,SAAS,GAAG,+BAA+B,CAAC,aAAa,CAAC,CAAA;QAChE,IAAI,CAAC,SAAS,EAAE;YACf,qBAAqB,CAAC,EAAiB,CAAC,CAAA;SACxC;QACD,OAAO,MAAM,kBAAkB,CAAC,SAAU,CAAwB,CAAA;IACnE,CAAC,CAAA;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/koa_jwt_token_decoded__b.ts"],"sourcesContent":["import type { nullish } from '@ctx-core/function'\nimport { be_, B } from '@ctx-core/object'\nimport { header_authorization_jwt_token_ } from '@ctx-core/jwt'\nimport { error_ctx_I, throw_bad_credentials } from '@ctx-core/error'\nimport type { jwt_token_decoded_I } from '@ctx-core/auth0'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nimport { jwt_token_decoded__b } from './jwt_token_decoded__b.js'\nconst key = 'koa_jwt_token_decoded_'\nexport const koa_jwt_token_decoded__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst jwt_token_decoded_ = jwt_token_decoded__b(ctx)\n\treturn async function koa_jwt_token_decoded_(authorization:string|nullish):Promise<jwt_token_decoded_I> {\n\t\tconst jwt_token = header_authorization_jwt_token_(authorization)\n\t\tif (!jwt_token) {\n\t\t\tthrow_bad_credentials({} as error_ctx_I)\n\t\t}\n\t\treturn await jwt_token_decoded_(jwt_token!) as jwt_token_decoded_I\n\t}\n})\nexport type koa_jwt_token_decoded__T = (authorization:string|undefined)=>Promise<jwt_token_decoded_I>\n"],"names":["be_","header_authorization_jwt_token_","throw_bad_credentials","jwt_token_decoded__b","key","koa_jwt_token_decoded__b","ctx","jwt_token_decoded_","koa_jwt_token_decoded_","authorization","jwt_token"],"mappings":"AACA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,+BAA+B,QAAQ,CAAe;AAC/D,MAAM,GAAgBC,qBAAqB,QAAQ,CAAiB;AAGpE,MAAM,GAAGC,oBAAoB,QAAQ,CAA2B;AAChE,KAAK,CAACC,GAAG,GAAG,CAAwB;AACpC,MAAM,CAAC,KAAK,CAACC,wBAAwB,GAA+BL,GAAG,CAACI,GAAG,GAAEE,GAAG,GAAE,CAAC;IAClF,KAAK,CAACC,kBAAkB,GAAGJ,oBAAoB,CAACG,GAAG;IACnD,MAAM,gBAAgBE,sBAAsB,CAACC,aAA4B,EAA+B,CAAC;QACxG,KAAK,CAACC,SAAS,GAAGT,+BAA+B,CAACQ,aAAa;QAC/D,EAAE,GAAGC,SAAS,EAAE,CAAC;YAChBR,qBAAqB,CAAC,CAAC;YAAA,CAAC;QACzB,CAAC;QACD,MAAM,CAAC,KAAK,CAACK,kBAAkB,CAACG,SAAS;IAC1C,CAAC;AACF,CAAC"}
@@ -3,7 +3,7 @@ import { user_id_, validate_auth0_user } from '@ctx-core/auth0';
3
3
  import { get_auth0_v2_user_b } from '@ctx-core/auth0-management';
4
4
  import { koa_jwt_token_decoded__b } from './koa_jwt_token_decoded__b.js';
5
5
  const key = 'verify_jwt_email_';
6
- export const verify_jwt_email__b = be_(key, ctx => {
6
+ export const verify_jwt_email__b = be_(key, (ctx)=>{
7
7
  const get_auth0_v2_user = get_auth0_v2_user_b(ctx);
8
8
  const koa_jwt_token_decoded_ = koa_jwt_token_decoded__b(ctx);
9
9
  return verify_jwt_email_;
@@ -25,4 +25,5 @@ export const verify_jwt_email__b = be_(key, ctx => {
25
25
  return email;
26
26
  }
27
27
  });
28
+
28
29
  //# sourceMappingURL=verify_jwt_email__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify_jwt_email__b.js","sourceRoot":"","sources":["../../src/node/verify_jwt_email__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAE/D,OAAO,EAAE,wBAAwB,EAAC,MAAM,+BAA+B,CAAA;AACvE,MAAM,GAAG,GAAG,mBAAmB,CAAA;AAC/B,MAAM,CAAC,MAAM,mBAAmB,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC5E,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAA;IAClD,MAAM,sBAAsB,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAA;IAC5D,OAAO,iBAAwC,CAAA;IAC/C,KAAK,UAAU,iBAAiB,CAAC,aAAoB;QACpD,MAAM,uBAAuB,GAAG,MAAM,sBAAsB,CAAC,aAAa,CAAC,CAAA;QAC3E,IAAI,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAA;QACzC,IAAI,CAAC,KAAK,EAAE;YACX,MAAM,OAAO,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAA;YACjD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;YACvD,MAAM,WAAW,GAAG;gBACnB,YAAY;gBACZ,OAAO;aACP,CAAA;YACD,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAA;YACrD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YAClC,mBAAmB,CAAC,IAAI,CAAC,CAAA;YACzB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;SAClB;QACD,OAAO,KAAK,CAAA;IACb,CAAC;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/verify_jwt_email__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { user_id_, validate_auth0_user } from '@ctx-core/auth0'\nimport { get_auth0_v2_user_b} from '@ctx-core/auth0-management'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nimport { koa_jwt_token_decoded__b} from './koa_jwt_token_decoded__b.js'\nconst key = 'verify_jwt_email_'\nexport const verify_jwt_email__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst get_auth0_v2_user = get_auth0_v2_user_b(ctx)\n\tconst koa_jwt_token_decoded_ = koa_jwt_token_decoded__b(ctx)\n\treturn verify_jwt_email_ as verify_jwt_email__T\n\tasync function verify_jwt_email_(authorization:string) {\n\t\tconst koajwt_token_decoded_fn = await koa_jwt_token_decoded_(authorization)\n\t\tlet email = koajwt_token_decoded_fn.email\n\t\tif (!email) {\n\t\t\tconst user_id = user_id_(koajwt_token_decoded_fn)\n\t\t\tconst AUTH0_DOMAIN = process.env.AUTH0_DOMAIN as string\n\t\t\tconst request_ctx = {\n\t\t\t\tAUTH0_DOMAIN,\n\t\t\t\tuser_id\n\t\t\t}\n\t\t\tconst response = await get_auth0_v2_user(request_ctx)\n\t\t\tconst user = await response.json()\n\t\t\tvalidate_auth0_user(user)\n\t\t\temail = user.email\n\t\t}\n\t\treturn email\n\t}\n})\nexport type verify_jwt_email__T = (authorization:string)=>Promise<string>\n"],"names":["be_","user_id_","validate_auth0_user","get_auth0_v2_user_b","koa_jwt_token_decoded__b","key","verify_jwt_email__b","ctx","get_auth0_v2_user","koa_jwt_token_decoded_","verify_jwt_email_","authorization","koajwt_token_decoded_fn","email","user_id","AUTH0_DOMAIN","process","env","request_ctx","response","user","json"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,QAAQ,EAAEC,mBAAmB,QAAQ,CAAiB;AAC/D,MAAM,GAAGC,mBAAmB,QAAO,CAA4B;AAE/D,MAAM,GAAGC,wBAAwB,QAAO,CAA+B;AACvE,KAAK,CAACC,GAAG,GAAG,CAAmB;AAC/B,MAAM,CAAC,KAAK,CAACC,mBAAmB,GAA+BN,GAAG,CAACK,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC7E,KAAK,CAACC,iBAAiB,GAAGL,mBAAmB,CAACI,GAAG;IACjD,KAAK,CAACE,sBAAsB,GAAGL,wBAAwB,CAACG,GAAG;IAC3D,MAAM,CAACG,iBAAiB;mBACTA,iBAAiB,CAACC,aAAoB,EAAE,CAAC;QACvD,KAAK,CAACC,uBAAuB,GAAG,KAAK,CAACH,sBAAsB,CAACE,aAAa;QAC1E,GAAG,CAACE,KAAK,GAAGD,uBAAuB,CAACC,KAAK;QACzC,EAAE,GAAGA,KAAK,EAAE,CAAC;YACZ,KAAK,CAACC,OAAO,GAAGb,QAAQ,CAACW,uBAAuB;YAChD,KAAK,CAACG,YAAY,GAAGC,OAAO,CAACC,GAAG,CAACF,YAAY;YAC7C,KAAK,CAACG,WAAW,GAAG,CAAC;gBACpBH,YAAY;gBACZD,OAAO;YACR,CAAC;YACD,KAAK,CAACK,QAAQ,GAAG,KAAK,CAACX,iBAAiB,CAACU,WAAW;YACpD,KAAK,CAACE,IAAI,GAAG,KAAK,CAACD,QAAQ,CAACE,IAAI;YAChCnB,mBAAmB,CAACkB,IAAI;YACxBP,KAAK,GAAGO,IAAI,CAACP,KAAK;QACnB,CAAC;QACD,MAAM,CAACA,KAAK;IACb,CAAC;AACF,CAAC"}
@@ -2,7 +2,7 @@ import { be_ } from '@ctx-core/object';
2
2
  import { user_id_ } from '@ctx-core/auth0';
3
3
  import { koa_jwt_token_decoded__b } from './koa_jwt_token_decoded__b.js';
4
4
  const key = 'verify_jwt_user_id_';
5
- export const verify_jwt_user_id__b = be_(key, ctx => {
5
+ export const verify_jwt_user_id__b = be_(key, (ctx)=>{
6
6
  const koa_jwt_token_decoded_ = koa_jwt_token_decoded__b(ctx);
7
7
  return verify_jwt_user_id_;
8
8
  async function verify_jwt_user_id_(authorization) {
@@ -11,4 +11,5 @@ export const verify_jwt_user_id__b = be_(key, ctx => {
11
11
  return user_id;
12
12
  }
13
13
  });
14
+
14
15
  //# sourceMappingURL=verify_jwt_user_id__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify_jwt_user_id__b.js","sourceRoot":"","sources":["../../src/node/verify_jwt_user_id__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,wBAAwB,EAAC,MAAM,+BAA+B,CAAA;AACvE,MAAM,GAAG,GAAG,qBAAqB,CAAA;AACjC,MAAM,CAAC,MAAM,qBAAqB,GAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC9E,MAAM,sBAAsB,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAA;IAC5D,OAAO,mBAA4C,CAAA;IACnD,KAAK,UAAU,mBAAmB,CAAC,aAAoB;QACtD,MAAM,iBAAiB,GAAG,MAAM,sBAAsB,CAAC,aAAa,CAAC,CAAA;QACrE,MAAM,OAAO,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;QAC3C,OAAO,OAAO,CAAA;IACf,CAAC;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"sources":["../../src/node/verify_jwt_user_id__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { user_id_ } from '@ctx-core/auth0'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nimport { koa_jwt_token_decoded__b} from './koa_jwt_token_decoded__b.js'\nconst key = 'verify_jwt_user_id_'\nexport const verify_jwt_user_id__b:B<auth0_ui_Ctx, typeof key> = be_(key, ctx=>{\n\tconst koa_jwt_token_decoded_ = koa_jwt_token_decoded__b(ctx)\n\treturn verify_jwt_user_id_ as verify_jwt_user_id__T\n\tasync function verify_jwt_user_id_(authorization:string) {\n\t\tconst jwt_token_decoded = await koa_jwt_token_decoded_(authorization)\n\t\tconst user_id = user_id_(jwt_token_decoded)\n\t\treturn user_id\n\t}\n})\nexport type verify_jwt_user_id__T = (authorization:string)=>Promise<string>\n"],"names":["be_","user_id_","koa_jwt_token_decoded__b","key","verify_jwt_user_id__b","ctx","koa_jwt_token_decoded_","verify_jwt_user_id_","authorization","jwt_token_decoded","user_id"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAQ,CAAiB;AAE1C,MAAM,GAAGC,wBAAwB,QAAO,CAA+B;AACvE,KAAK,CAACC,GAAG,GAAG,CAAqB;AACjC,MAAM,CAAC,KAAK,CAACC,qBAAqB,GAA+BJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC/E,KAAK,CAACC,sBAAsB,GAAGJ,wBAAwB,CAACG,GAAG;IAC3D,MAAM,CAACE,mBAAmB;mBACXA,mBAAmB,CAACC,aAAoB,EAAE,CAAC;QACzD,KAAK,CAACC,iBAAiB,GAAG,KAAK,CAACH,sBAAsB,CAACE,aAAa;QACpE,KAAK,CAACE,OAAO,GAAGT,QAAQ,CAACQ,iBAAiB;QAC1C,MAAM,CAACC,OAAO;IACf,CAAC;AACF,CAAC"}
@@ -0,0 +1,169 @@
1
+ <script lang="ts">
2
+ import { setContext } from 'svelte'
3
+ import {
4
+ auth0_forgot_password_opened$_b, auth0_opened_class$_b, auth0_login_opened$_b, auth0_signup_opened$_b,
5
+ auth0_forgot_password_check_email_opened$_b, auth0_change_password_opened$_b
6
+ } from '@ctx-core/auth0'
7
+ import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
8
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
9
+ import { Auth0_c } from './Auth0_c.js'
10
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
11
+ import Auth0_Login_Form from './Auth0_Login_Form.svelte'
12
+ import Auth0_Signup_Form from './Auth0_Signup_Form.svelte'
13
+ import Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'
14
+ import Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'
15
+ import Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'
16
+ export let ctx = {} as auth0_ui_Ctx
17
+ export let dialog = false
18
+ setContext(auth0_ui_ctx_key, ctx)
19
+ const auth0_change_password_opened$ = auth0_change_password_opened$_b(ctx)
20
+ const auth0_opened_class$ = auth0_opened_class$_b(ctx)
21
+ const auth0_forgot_password_check_email_opened$ = auth0_forgot_password_check_email_opened$_b(ctx)
22
+ const auth0_forgot_password_opened$ = auth0_forgot_password_opened$_b(ctx)
23
+ const auth0_login_opened$ = auth0_login_opened$_b(ctx)
24
+ const auth0_signup_opened$ = auth0_signup_opened$_b(ctx)
25
+ const _ = new Auth0_c(ctx)
26
+ </script>
27
+
28
+ <div
29
+ class="Auth0 {$auth0_opened_class$} {$$props.class || ''}"
30
+ class:dialog
31
+ class:visible={!!$auth0_opened_class$}
32
+ >
33
+ <Auth0_Dialog_Close></Auth0_Dialog_Close>
34
+ {#if $auth0_login_opened$}
35
+ <Auth0_Login_Form {...$$props}></Auth0_Login_Form>
36
+ {:else if $auth0_signup_opened$}
37
+ <Auth0_Signup_Form {...$$props}>
38
+ <div slot="tos__signup"></div>
39
+ </Auth0_Signup_Form>
40
+ {:else if $auth0_forgot_password_opened$}
41
+ <Auth0_Forgot_Password_Form {...$$props}></Auth0_Forgot_Password_Form>
42
+ {:else if $auth0_forgot_password_check_email_opened$}
43
+ <Auth0_Forgot_Password_Check_Email_Form></Auth0_Forgot_Password_Check_Email_Form>
44
+ {:else if $auth0_change_password_opened$}
45
+ <Auth0_Change_Password_Form {...$$props}></Auth0_Change_Password_Form>
46
+ {/if}
47
+ <slot></slot>
48
+ </div>
49
+
50
+ <style type="text/scss">
51
+ :global(.Auth0) {
52
+ display: block;
53
+ overflow: hidden;
54
+ &.dialog {
55
+ :global(div) {
56
+ :global(.close) {
57
+ display: block;
58
+ }
59
+ }
60
+ }
61
+ :global(h1) {
62
+ font-size: 2rem;
63
+ text-align: center;
64
+ }
65
+ [name=navigation__auth] {
66
+ display: none;
67
+ ~ .form {
68
+ display: none;
69
+ }
70
+ &.navigation__auth-signup:checked {
71
+ ~ .signup {
72
+ display: block;
73
+ }
74
+ }
75
+ &.navigation__auth-login:checked {
76
+ ~ .login {
77
+ display: block;
78
+ }
79
+ }
80
+ &.navigation__auth-forgot_password:checked {
81
+ ~ .forgot_password {
82
+ display: block;
83
+ }
84
+ }
85
+ &.navigation__auth-forgot_password_check_email:checked {
86
+ ~ .forgot_password_check_email {
87
+ display: block;
88
+ }
89
+ }
90
+ &.navigation__auth-change_password:checked {
91
+ ~ .change_password {
92
+ display: block;
93
+ }
94
+ }
95
+ }
96
+ :global(label.navigation__auth) {
97
+ color: #3EBBC0;
98
+ font-weight: bold;
99
+ &:hover {
100
+ text-decoration: underline;
101
+ }
102
+ }
103
+ > :global(div) {
104
+ position: relative;
105
+ height: 100%;
106
+ > :global(.close) {
107
+ display: none;
108
+ position: absolute;
109
+ right: 0;
110
+ }
111
+ }
112
+ :global(form) {
113
+ :global(input) {
114
+ line-height: 1.8rem;
115
+ border-color: transparent;
116
+ border-bottom: 2px solid lightgrey;
117
+ &.invalid {
118
+ border-color: red;
119
+ }
120
+ }
121
+ :global(label) {
122
+ display: block;
123
+ }
124
+ :global(fieldset) {
125
+ clear: both;
126
+ border: none;
127
+ :global(.field) {
128
+ width: 20em;
129
+ margin: 0 auto;
130
+ display: block;
131
+ clear: both;
132
+ text-align: left;
133
+ :global(input) {
134
+ display: block;
135
+ width: 100%;
136
+ padding: 0.2em;
137
+ color: black;
138
+ }
139
+ }
140
+ :global(p) {
141
+ margin-bottom: 0;
142
+ -webkit-margin-after: 0;
143
+ }
144
+ }
145
+ :global(footer) {
146
+ margin-top: 1rem;
147
+ text-align: center;
148
+ :global(.button) {
149
+ float: none;
150
+ width: 10em;
151
+ padding: 0.4rem;
152
+ color: white;
153
+ background-color: #3EBBC0;
154
+ border-radius: 5px;
155
+ border: none;
156
+ &:hover {
157
+ background-color: #5CC6CA;
158
+ }
159
+ }
160
+ :global(label) {
161
+ margin-top: 1em;
162
+ }
163
+ }
164
+ }
165
+ :global(.error) {
166
+ color: red;
167
+ }
168
+ }
169
+ </style>
@@ -0,0 +1,99 @@
1
+ <script lang="ts">
2
+ import { createEventDispatcher } from 'svelte'
3
+ import { AUTH0_DOMAIN$_b, auth0_token_error$_b } from '@ctx-core/auth0'
4
+ import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
5
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
6
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
7
+ import { Auth0_c } from './Auth0_c.js'
8
+ const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
9
+ const dispatch = createEventDispatcher()
10
+ export let error_class = ''
11
+ export let input_class = ''
12
+ export let button_class = ''
13
+ export let label_class = '.js'
14
+ const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
15
+ const auth0_token_error$ = auth0_token_error$_b(ctx)
16
+ const _ = new Auth0_c(ctx)
17
+ let root
18
+ let password_input
19
+ let password_confirmation_input
20
+ let password_error //region
21
+ $: password_error =
22
+ $auth0_token_error$
23
+ && $auth0_token_error$.password //endregion
24
+ let password_error_confirmation //region
25
+ $: password_error_confirmation =
26
+ $auth0_token_error$
27
+ && $auth0_token_error$.password_confirmation //endregion
28
+ async function in_onsubmit_change_password(event) {
29
+ dispatch('submit__start')
30
+ try {
31
+ await _.onsubmit_change_password(event, {
32
+ password_input,
33
+ password_confirmation_input,
34
+ }, _._schedule_forms_clear(root))
35
+ dispatch('success')
36
+ } catch (error) {
37
+ dispatch('error', { error })
38
+ throw error
39
+ } finally {
40
+ dispatch('submit__end')
41
+ }
42
+ }
43
+ </script>
44
+
45
+ <div bind:this="{root}" class="form change_password Auth0_Change_Password_Form">
46
+ <Auth0_Dialog_Close></Auth0_Dialog_Close>
47
+ <h1>Change Password</h1>
48
+ <form
49
+ action="https://{$AUTH0_DOMAIN$}/dbconnections/change_password"
50
+ accept-charset="UTF-8"
51
+ method="post"
52
+ on:submit|preventDefault="{in_onsubmit_change_password}"
53
+ >
54
+ {#if $auth0_token_error$}
55
+ <ul>
56
+ {#if password_error}
57
+ <li class="error {error_class}">
58
+ {password_error}
59
+ </li>
60
+ {/if}
61
+ {#if password_error_confirmation}
62
+ <li class="error {error_class}">
63
+ {password_error_confirmation}
64
+ </li>
65
+ {/if}
66
+ </ul>
67
+ {/if}
68
+ <fieldset>
69
+ <label class="field">
70
+ <div class="{label_class}">Password</div>
71
+ <input
72
+ bind:this={password_input}
73
+ placeholder="**********"
74
+ required="required"
75
+ class="{input_class}"
76
+ class:invalid="{password_error}"
77
+ id="password-change_password"
78
+ type="password"
79
+ name="password"/>
80
+ </label>
81
+ <label class="field">
82
+ <div class="{label_class}">Confirm Password</div>
83
+ <input
84
+ bind:this={password_confirmation_input}
85
+ type="password"
86
+ id="password_confirmation-change_password"
87
+ name="password_confirmation"
88
+ class="{input_class}"
89
+ class:invalid="{password_error_confirmation}"
90
+ required="required"
91
+ placeholder="**********"
92
+ />
93
+ </label>
94
+ </fieldset>
95
+ <footer>
96
+ <input type="submit" value="Change Password" class="button {button_class}"/>
97
+ </footer>
98
+ </form>
99
+ </div>
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import { CloseDialogHandle } from '@ctx-core/dialog'
3
+ import { Auth0_c } from './Auth0_c.js'
4
+ import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
5
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx'
6
+ const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
7
+ const _ = new Auth0_c(ctx)
8
+ </script>
9
+
10
+ <CloseDialogHandle on:click={_.onclose}></CloseDialogHandle>
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
3
+ let root:HTMLDivElement
4
+ </script>
5
+
6
+ <div bind:this="{root}" class="form forgot_password_check_email">
7
+ <Auth0_Dialog_Close></Auth0_Dialog_Close>
8
+ <h1>Check Your Email</h1>
9
+ <p>An email to reset you password has been sent to you.</p>
10
+ </div>