@ctx-core/auth0-ui 10.0.123 → 11.0.4

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 (47) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/auth0_ui_ctx_I.generated.js.map +1 -1
  3. package/dist/ui/Auth0.svelte +5 -6
  4. package/dist/ui/Auth0_Change_Password_Form.svelte +17 -24
  5. package/dist/ui/Auth0_Dialog_Close.svelte +2 -2
  6. package/dist/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +1 -1
  7. package/dist/ui/Auth0_Forgot_Password_Form.svelte +10 -14
  8. package/dist/ui/Auth0_Loggedin_If.svelte +1 -1
  9. package/dist/ui/Auth0_Login_Form.svelte +25 -29
  10. package/dist/ui/Auth0_Signup_Form.svelte +34 -35
  11. package/dist/ui/Auth0_c.js +8 -8
  12. package/dist/ui/Auth0_c.js.map +1 -1
  13. package/package.json +19 -15
  14. package/src/auth0_ui_ctx_I.generated.ts +2 -12
  15. package/src/ui/Auth0.svelte +5 -6
  16. package/src/ui/Auth0_Change_Password_Form.svelte +17 -24
  17. package/src/ui/Auth0_Dialog_Close.svelte +2 -2
  18. package/src/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +1 -1
  19. package/src/ui/Auth0_Forgot_Password_Form.svelte +10 -14
  20. package/src/ui/Auth0_Loggedin_If.svelte +1 -1
  21. package/src/ui/Auth0_Login_Form.svelte +25 -29
  22. package/src/ui/Auth0_Signup_Form.svelte +34 -35
  23. package/src/ui/Auth0_c.ts +16 -15
  24. package/dist/index.browser.js +0 -6
  25. package/dist/index.browser.js.map +0 -1
  26. package/dist/node/index.js +0 -8
  27. package/dist/node/index.js.map +0 -1
  28. package/dist/node/jwks_cert__b.js +0 -19
  29. package/dist/node/jwks_cert__b.js.map +0 -1
  30. package/dist/node/jwks_x5c__b.js +0 -21
  31. package/dist/node/jwks_x5c__b.js.map +0 -1
  32. package/dist/node/jwt_token_decoded__b.js +0 -15
  33. package/dist/node/jwt_token_decoded__b.js.map +0 -1
  34. package/dist/node/koa_jwt_token_decoded__b.js +0 -18
  35. package/dist/node/koa_jwt_token_decoded__b.js.map +0 -1
  36. package/dist/node/verify_jwt_email__b.js +0 -29
  37. package/dist/node/verify_jwt_email__b.js.map +0 -1
  38. package/dist/node/verify_jwt_user_id__b.js +0 -15
  39. package/dist/node/verify_jwt_user_id__b.js.map +0 -1
  40. package/src/index.browser.js +0 -4
  41. package/src/node/index.ts +0 -6
  42. package/src/node/jwks_cert__b.ts +0 -19
  43. package/src/node/jwks_x5c__b.ts +0 -21
  44. package/src/node/jwt_token_decoded__b.ts +0 -15
  45. package/src/node/koa_jwt_token_decoded__b.ts +0 -19
  46. package/src/node/verify_jwt_email__b.ts +0 -29
  47. package/src/node/verify_jwt_user_id__b.ts +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # @ctx-core/auth0-ui
2
2
 
3
+ ## 11.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @swc/core: ^1.2.107 -> ^1.2.108
8
+ - Updated dependencies
9
+ - Updated dependencies
10
+ - @ctx-core/auth0@26.0.1
11
+ - @ctx-core/auth0-management@6.0.103
12
+ - @ctx-core/dialog@15.0.79
13
+ - @ctx-core/dom@11.0.31
14
+ - @ctx-core/error@11.0.19
15
+ - @ctx-core/fetch@11.0.81
16
+ - @ctx-core/function@20.2.4
17
+ - @ctx-core/http@9.0.1
18
+ - @ctx-core/jwt@10.0.29
19
+ - @ctx-core/logger@9.0.20
20
+ - @ctx-core/object@21.0.23
21
+ - @ctx-core/store@27.0.37
22
+
23
+ ## 11.0.3
24
+
25
+ ### Patch Changes
26
+
27
+ - - index.browser.js
28
+
29
+ ## 11.0.2
30
+
31
+ ### Patch Changes
32
+
33
+ - fix: auth0_ui_ctx_I: remove props due to extracting @ctx-core/auth0-service
34
+
35
+ ## 11.0.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies
40
+ - Updated dependencies
41
+ - Updated dependencies
42
+ - Updated dependencies
43
+ - Updated dependencies
44
+ - Updated dependencies
45
+ - @ctx-core/http@9.0.0
46
+ - @ctx-core/auth0@26.0.0
47
+ - @ctx-core/jwt@10.0.28
48
+ - @ctx-core/auth0-management@6.0.102
49
+
50
+ ## 11.0.0
51
+
52
+ ### Major Changes
53
+
54
+ - extracted @ctx-core/auth0-service from @ctx-core/auth0-ui
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies
59
+ - @ctx-core/http@8.0.0
60
+
3
61
  ## 10.0.123
4
62
 
5
63
  ### Patch Changes
@@ -1 +1 @@
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
+ {"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*/\n\nexport interface auth0_ui_ctx_I {\n\n}"],"names":[],"mappings":"AAAA,EAEE,AAFF;;AAEE,AAFF,EAEE,CAEF,MAAM"}
@@ -4,17 +4,16 @@ import {
4
4
  auth0_forgot_password_opened$_b, auth0_opened_class$_b, auth0_login_opened$_b, auth0_signup_opened$_b,
5
5
  auth0_forgot_password_check_email_opened$_b, auth0_change_password_opened$_b
6
6
  } from '@ctx-core/auth0'
7
- import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
8
7
  import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
8
+ import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
9
9
  import { Auth0_c } from './Auth0_c.js'
10
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
11
  import Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'
15
12
  import Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'
16
- export let ctx = {} as auth0_ui_Ctx
17
- export let dialog = false
13
+ import Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'
14
+ import Auth0_Login_Form from './Auth0_Login_Form.svelte'
15
+ import Auth0_Signup_Form from './Auth0_Signup_Form.svelte'
16
+ export let ctx = {} as auth0_ui_Ctx, dialog = false
18
17
  setContext(auth0_ui_ctx_key, ctx)
19
18
  const auth0_change_password_opened$ = auth0_change_password_opened$_b(ctx)
20
19
  const auth0_opened_class$ = auth0_opened_class$_b(ctx)
@@ -7,31 +7,24 @@ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
7
7
  import { Auth0_c } from './Auth0_c.js'
8
8
  const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
9
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'
10
+ export let error_class = '', input_class = '', button_class = '', label_class = '.js'
14
11
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
15
12
  const auth0_token_error$ = auth0_token_error$_b(ctx)
16
13
  const _ = new Auth0_c(ctx)
17
- let root
18
- let password_input
14
+ let root:HTMLDivElement
15
+ let password_input:HTMLInputElement
19
16
  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) {
17
+ let password_error:any|undefined //region
18
+ $: password_error = $auth0_token_error$?.password //endregion
19
+ let password_error_confirmation:string|undefined //region
20
+ $: password_error_confirmation = $auth0_token_error$?.password_confirmation //endregion
21
+ async function onsubmit_change_password(event:FormDataEvent) {
29
22
  dispatch('submit__start')
30
23
  try {
31
24
  await _.onsubmit_change_password(event, {
32
25
  password_input,
33
26
  password_confirmation_input,
34
- }, _._schedule_forms_clear(root))
27
+ }, ()=>_.schedule_forms_clear(root))
35
28
  dispatch('success')
36
29
  } catch (error) {
37
30
  dispatch('error', { error })
@@ -42,14 +35,14 @@ async function in_onsubmit_change_password(event) {
42
35
  }
43
36
  </script>
44
37
 
45
- <div bind:this="{root}" class="form change_password Auth0_Change_Password_Form">
38
+ <div bind:this={root} class="form change_password Auth0_Change_Password_Form">
46
39
  <Auth0_Dialog_Close></Auth0_Dialog_Close>
47
40
  <h1>Change Password</h1>
48
41
  <form
49
42
  action="https://{$AUTH0_DOMAIN$}/dbconnections/change_password"
50
43
  accept-charset="UTF-8"
51
44
  method="post"
52
- on:submit|preventDefault="{in_onsubmit_change_password}"
45
+ on:submit|preventDefault={onsubmit_change_password}
53
46
  >
54
47
  {#if $auth0_token_error$}
55
48
  <ul>
@@ -67,26 +60,26 @@ async function in_onsubmit_change_password(event) {
67
60
  {/if}
68
61
  <fieldset>
69
62
  <label class="field">
70
- <div class="{label_class}">Password</div>
63
+ <div class={label_class}>Password</div>
71
64
  <input
72
65
  bind:this={password_input}
73
66
  placeholder="**********"
74
67
  required="required"
75
- class="{input_class}"
76
- class:invalid="{password_error}"
68
+ class={input_class}
69
+ class:invalid={password_error}
77
70
  id="password-change_password"
78
71
  type="password"
79
72
  name="password"/>
80
73
  </label>
81
74
  <label class="field">
82
- <div class="{label_class}">Confirm Password</div>
75
+ <div class={label_class}>Confirm Password</div>
83
76
  <input
84
77
  bind:this={password_confirmation_input}
85
78
  type="password"
86
79
  id="password_confirmation-change_password"
87
80
  name="password_confirmation"
88
- class="{input_class}"
89
- class:invalid="{password_error_confirmation}"
81
+ class={input_class}
82
+ class:invalid={password_error_confirmation}
90
83
  required="required"
91
84
  placeholder="**********"
92
85
  />
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { CloseDialogHandle } from '@ctx-core/dialog'
3
- import { Auth0_c } from './Auth0_c.js'
3
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
4
4
  import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
5
- import type { auth0_ui_Ctx } from '../auth0_ui_Ctx'
5
+ import { Auth0_c } from './Auth0_c.js'
6
6
  const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
7
7
  const _ = new Auth0_c(ctx)
8
8
  </script>
@@ -3,7 +3,7 @@ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
3
3
  let root:HTMLDivElement
4
4
  </script>
5
5
 
6
- <div bind:this="{root}" class="form forgot_password_check_email">
6
+ <div bind:this={root} class="form forgot_password_check_email">
7
7
  <Auth0_Dialog_Close></Auth0_Dialog_Close>
8
8
  <h1>Check Your Email</h1>
9
9
  <p>An email to reset you password has been sent to you.</p>
@@ -1,22 +1,18 @@
1
1
  <script lang="ts">
2
2
  import { AUTH0_DOMAIN$_b, auth0_token_error$_b, open_auth0_login_b, open_auth0_signup_b } from '@ctx-core/auth0'
3
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
3
4
  import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
4
- import type { auth0_ui_Ctx } from '../auth0_ui_Ctx'
5
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
6
5
  import { Auth0_c } from './Auth0_c.js'
7
- export let error_class = ''
8
- export let input_class = ''
9
- export let button_class = ''
10
- export let label_class = '.js'
6
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
7
+ export let error_class = '', input_class = '', button_class = '', label_class = '.js'
11
8
  const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
12
9
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
13
10
  const auth0_token_error$ = auth0_token_error$_b(ctx)
14
11
  const open_auth0_login = open_auth0_login_b(ctx)
15
12
  const open_auth0_signup = open_auth0_signup_b(ctx)
16
13
  const _ = new Auth0_c(ctx)
17
- let email_input
18
- let email_error:string[]
19
- $: email_error = $auth0_token_error$?.email
14
+ let email_input:HTMLInputElement, error:string
15
+ $: error = $auth0_token_error$?.error
20
16
  </script>
21
17
 
22
18
  <div class="form forgot_password">
@@ -26,7 +22,7 @@ $: email_error = $auth0_token_error$?.email
26
22
  action="https://{$AUTH0_DOMAIN$}/passwordless/start"
27
23
  accept-charset="UTF-8"
28
24
  method="post"
29
- on:submit="{event => _.onsubmit_forgot_password(event, { email_input })}"
25
+ on:submit={event => _.onsubmit_forgot_password(event, { email_input })}
30
26
  >
31
27
  {#if $auth0_token_error$}
32
28
  <ul>
@@ -37,13 +33,13 @@ $: email_error = $auth0_token_error$?.email
37
33
  {/if}
38
34
  <fieldset>
39
35
  <label class="field">
40
- <div class="{label_class}">Email</div>
36
+ <div class={label_class}>Email</div>
41
37
  <input
42
38
  bind:this={email_input}
43
39
  placeholder="your@email.com"
44
40
  required="required"
45
41
  class="form-control {input_class}"
46
- class:invalid="{email_error}"
42
+ class:invalid={error}
47
43
  type="email"
48
44
  id="email-forgot_password"
49
45
  name="email"/>
@@ -57,11 +53,11 @@ $: email_error = $auth0_token_error$?.email
57
53
  />
58
54
  <label
59
55
  class="navigation__auth {label_class}"
60
- on:click="{open_auth0_login}"
56
+ on:click={open_auth0_login}
61
57
  >Have an account? Log in&hellip;</label>
62
58
  <label
63
59
  class="navigation__auth {label_class}"
64
- on:click="{open_auth0_signup}"
60
+ on:click={open_auth0_signup}
65
61
  >Don't have an account? Signup&hellip;</label>
66
62
  </footer>
67
63
  </form>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { is_auth0_loggedin$_b, is_auth0_loggedout$_b, } from '@ctx-core/auth0'
3
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
3
4
  import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
4
- import type { auth0_ui_Ctx } from '../auth0_ui_Ctx'
5
5
  const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
6
6
  const is_auth0_loggedin$ = is_auth0_loggedin$_b(ctx)
7
7
  const is_auth0_loggedout$ = is_auth0_loggedout$_b(ctx)
@@ -1,70 +1,66 @@
1
1
  <script lang="ts">
2
2
  import {
3
- AUTH0_DOMAIN$_b, auth0_token_error$_b, auth0_token_error_txt_b, open_auth0_forgot_password_b, open_auth0_signup_b
3
+ AUTH0_DOMAIN$_b, auth0_token_error$_b, auth0_token_error_txt$_b, open_auth0_forgot_password_b, open_auth0_signup_b
4
4
  } from '@ctx-core/auth0'
5
5
  import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
6
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
7
6
  import { Auth0_c } from './Auth0_c.js'
8
- export let ctx:auth0_ui_Ctx
9
- export let error_class = ''
10
- export let input_class = ''
11
- export let button_class = ''
12
- export let label_class = '.js'
13
- const auth0_token_error = auth0_token_error$_b(ctx)
14
- const auth0_token_error_txt = auth0_token_error_txt_b(ctx)
7
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
8
+ export let ctx:auth0_ui_Ctx, error_class = '', input_class = '', button_class = '', label_class = '.js'
9
+ const auth0_token_error$ = auth0_token_error$_b(ctx)
10
+ const auth0_token_error_txt$ = auth0_token_error_txt$_b(ctx)
15
11
  const AUTH0_DOMAIN = AUTH0_DOMAIN$_b(ctx)
16
12
  const open_auth0_signup = open_auth0_signup_b(ctx)
17
13
  const open_auth0_forgot_password = open_auth0_forgot_password_b(ctx)
18
14
  const _ = new Auth0_c(ctx)
19
- let root
20
- let username_login_input, password_login_input
21
- let username_error//region
22
- $: username_error = $auth0_token_error && $auth0_token_error.username //endregion
23
- let error__password//region
24
- $: error__password = $auth0_token_error && $auth0_token_error.password //endregion
15
+ let root:HTMLDivElement
16
+ let username_login_input:HTMLInputElement, password_login_input:HTMLInputElement
17
+ let error_username:string|undefined//region
18
+ $: error_username = $auth0_token_error$?.username //endregion
19
+ let error_password:string|undefined//region
20
+ $: error_password = $auth0_token_error$?.password //endregion
25
21
  </script>
26
22
 
27
- <div bind:this="{root}" class="form {$$props.class||''}">
23
+ <div bind:this={root} class="form {$$props.class||''}">
28
24
  <Auth0_Dialog_Close></Auth0_Dialog_Close>
29
25
  <h1><slot name="login_text">Welcome</slot></h1>
30
26
  <form
31
27
  action="https://{$AUTH0_DOMAIN}/oauth/token"
32
28
  accept-charset="UTF-8"
33
29
  method="post"
34
- on:submit="{event =>
30
+ on:submit={event =>
35
31
  _.onsubmit_login(event, {
36
32
  username_login_input,
37
33
  password_login_input
38
- }, _._schedule_forms_clear(root))}"
34
+ }, ()=>_.schedule_forms_clear(root))}
39
35
  >
40
- {#if $auth0_token_error_txt}
36
+ {#if $auth0_token_error_txt$}
41
37
  <ul>
42
38
  <li class="error {error_class}">
43
- {$auth0_token_error_txt}
39
+ {$auth0_token_error_txt$}
44
40
  </li>
45
41
  </ul>
46
42
  {/if}
47
43
  <fieldset>
48
44
  <label class="field">
49
- <div class="{label_class}">Email</div>
45
+ <div class={label_class}>Email</div>
50
46
  <input
51
- bind:this="{username_login_input}"
47
+ bind:this={username_login_input}
52
48
  placeholder="your@email.com"
53
49
  required="required"
54
50
  class="form-control {input_class}"
55
- class:invalid="{username_error}"
51
+ class:invalid={error_username}
56
52
  type="email"
57
53
  id="username-login"
58
54
  name="username"/>
59
55
  </label>
60
56
  <label class="field">
61
- <div class="{label_class}">Password</div>
57
+ <div class={label_class}>Password</div>
62
58
  <input
63
- bind:this="{password_login_input}"
59
+ bind:this={password_login_input}
64
60
  placeholder="**********"
65
61
  required="required"
66
- class="{input_class}"
67
- class:invalid="{error__password}"
62
+ class={input_class}
63
+ class:invalid={error_password}
68
64
  id="password-login"
69
65
  type="password"
70
66
  name="password"/>
@@ -78,11 +74,11 @@ $: error__password = $auth0_token_error && $auth0_token_error.password //endregi
78
74
  />
79
75
  <label
80
76
  class="navigation__auth {label_class}"
81
- on:click="{open_auth0_signup}"
77
+ on:click={open_auth0_signup}
82
78
  >Don't have an account? Signup&hellip;</label>
83
79
  <label
84
80
  class="navigation__auth {label_class}"
85
- on:click="{open_auth0_forgot_password}"
81
+ on:click={open_auth0_forgot_password}
86
82
  >Forgot Password?</label>
87
83
  </footer>
88
84
  </form>
@@ -1,13 +1,12 @@
1
1
  <script lang="ts">
2
- import { AUTH0_DOMAIN$_b, auth0_token_error$_b, open_auth0_forgot_password_b, open_auth0_login_b } from '@ctx-core/auth0'
2
+ import {
3
+ AUTH0_DOMAIN$_b, auth0_token_error$_b, open_auth0_forgot_password_b, open_auth0_login_b,
4
+ } from '@ctx-core/auth0'
5
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
3
6
  import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
4
- import type { auth0_ui_Ctx } from '../auth0_ui_Ctx'
5
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
6
7
  import { Auth0_c } from './Auth0_c.js'
7
- export let class__error = ''
8
- export let class__input = ''
9
- export let class__button = ''
10
- export let class__label = '.js'
8
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
9
+ export let error_class = '', input_class = '', button_class = '', label_class = '.js'
11
10
  const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
12
11
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
13
12
  const auth0_token_error$ = auth0_token_error$_b(ctx)
@@ -15,13 +14,13 @@ const open_auth0_login = open_auth0_login_b(ctx)
15
14
  const open_auth0_forgot_password = open_auth0_forgot_password_b(ctx)
16
15
  const _ = new Auth0_c(ctx)
17
16
  let root, signup_email_input, signup_password_input, signup_password_confirmation_input
18
- let email_error //region
19
- $: email_error = $auth0_token_error$ && $auth0_token_error$.email //endregion
20
- let password_error //region
21
- $: password_error = $auth0_token_error$ && $auth0_token_error$.password //endregion
22
- let password_error_confirmation //region
23
- $: password_error_confirmation = $auth0_token_error$ && password_error_confirmation //endregion
24
- let error_text
17
+ let error_username:string|undefined //region
18
+ $: error_username = $auth0_token_error$?.username //endregion
19
+ let error_password:string|undefined //region
20
+ $: error_password = $auth0_token_error$?.password //endregion
21
+ let error_password_confirmation:string|undefined //region
22
+ $: error_password_confirmation = $auth0_token_error$ && error_password_confirmation //endregion
23
+ let error_text:string
25
24
  $: {
26
25
  let error_text_a = []
27
26
  if ($auth0_token_error$) {
@@ -40,55 +39,55 @@ $: {
40
39
  action="https://{$AUTH0_DOMAIN$}/dbconnections/signup"
41
40
  accept-charset="UTF-8"
42
41
  method="post"
43
- on:submit="{event =>
42
+ on:submit={event =>
44
43
  _.onsubmit_signup(event, {
45
44
  signup_email_input,
46
45
  signup_password_input,
47
46
  signup_password_confirmation_input
48
- }, _._schedule_forms_clear(root))
49
- }"
47
+ }, _.schedule_forms_clear(root))
48
+ }
50
49
  >
51
50
  {#if $auth0_token_error$}
52
51
  <ul>
53
- <li class="error {class__error}">
52
+ <li class="error {error_class}">
54
53
  {error_text}
55
54
  </li>
56
55
  </ul>
57
56
  {/if}
58
57
  <fieldset>
59
58
  <label class="field">
60
- <div class="{class__label}">Email</div>
59
+ <div class={label_class}>Email</div>
61
60
  <input
62
- bind:this="{signup_email_input}"
61
+ bind:this={signup_email_input}
63
62
  placeholder="your@email.com"
64
63
  required="required"
65
64
  autocomplete="email"
66
- class="form-control {class__input}"
67
- class:invalid="{email_error}"
65
+ class="form-control {input_class}"
66
+ class:invalid={error_username}
68
67
  type="email"
69
68
  id="email-signup"
70
69
  name="email"/>
71
70
  </label>
72
71
  <label class="field">
73
- <div class="{class__label}">Password</div>
72
+ <div class={label_class}>Password</div>
74
73
  <input
75
- bind:this="{signup_password_input}"
74
+ bind:this={signup_password_input}
76
75
  placeholder="**********"
77
76
  required="required"
78
- class="{class__input}"
79
- class:invalid="{password_error}"
77
+ class={input_class}
78
+ class:invalid={error_password}
80
79
  id="password-signup"
81
80
  type="password"
82
81
  name="password"/>
83
82
  </label>
84
83
  <label class="field">
85
- <div class="{class__label}">Confirm Password</div>
84
+ <div class={label_class}>Confirm Password</div>
86
85
  <input
87
- bind:this="{signup_password_confirmation_input}"
86
+ bind:this={signup_password_confirmation_input}
88
87
  placeholder="**********"
89
88
  required="required"
90
- class="{class__input}"
91
- class:invalid="{password_error_confirmation}"
89
+ class={input_class}
90
+ class:invalid={error_password_confirmation}
92
91
  type="password"
93
92
  name="password_confirmation"
94
93
  id="password_confirmation-signup"/>
@@ -106,15 +105,15 @@ $: {
106
105
  <input
107
106
  type="submit"
108
107
  value="Sign up"
109
- class="button {class__button}"
108
+ class="button {button_class}"
110
109
  />
111
110
  <label
112
- class="navigation__auth {class__label}"
113
- on:click="{open_auth0_login}"
111
+ class="navigation__auth {label_class}"
112
+ on:click={open_auth0_login}
114
113
  >Have an account? Log in&hellip;</label>
115
114
  <label
116
- class="navigation__auth {class__label}"
117
- on:click="{open_auth0_forgot_password}"
115
+ class="navigation__auth {label_class}"
116
+ on:click={open_auth0_forgot_password}
118
117
  >Forgot Password?</label>
119
118
  </footer>
120
119
  </form>
@@ -1,7 +1,8 @@
1
1
  import { onDestroy } from 'svelte';
2
+ import { auth0_body__b, auth0_opened_class$_b, auth0_token_error$_b, auth0_token_json$_b, clear_auth0_token_error_b, close_auth0_b, logout_auth0_token_error_b, open_auth0_forgot_password_check_email_b, open_auth0_login_b, password_realm_body__b, post_auth0_auth_change_password_b, post_auth0_dbconnections_signup_b, post_auth0_oauth_token_b, post_auth0_passwordless_start_b, validate_auth0_change_password, validate_auth0_forgot_password, validate_auth0_signup } from '@ctx-core/auth0';
2
3
  import { has_dom, dom_a_ } from '@ctx-core/dom';
4
+ import { noop } from '@ctx-core/function';
3
5
  import { subscribe } from '@ctx-core/store';
4
- import { auth0_body__b, auth0_opened_class$_b, auth0_token_error$_b, auth0_token_json$_b, clear_auth0_token_error_b, close_auth0_b, logout_auth0_token_error_b, open_auth0_forgot_password_check_email_b, open_auth0_login_b, password_realm_body__b, post_auth0_auth_change_password_b, post_auth0_dbconnections_signup_b, post_auth0_oauth_token_b, post_auth0_passwordless_start_b, validate_auth0_change_password, validate_auth0_forgot_password, validate_auth0_signup } from '@ctx-core/auth0';
5
6
  export class Auth0_c {
6
7
  constructor(ctx1){
7
8
  this.ctx = ctx1;
@@ -58,7 +59,7 @@ export class Auth0_c {
58
59
  }
59
60
  schedule_forms_clear();
60
61
  await this.login({
61
- username: data.email,
62
+ username: data.username,
62
63
  password: data.password
63
64
  }, schedule_forms_clear);
64
65
  };
@@ -73,7 +74,7 @@ export class Auth0_c {
73
74
  if (response.status == 401) {
74
75
  this.open_auth0_login();
75
76
  const auth0_token_error = {
76
- email: 'Authentication Error - Log in'
77
+ username: 'Authentication Error - Log in'
77
78
  };
78
79
  this.logout_auth0_token_error(auth0_token_error);
79
80
  return;
@@ -109,11 +110,11 @@ export class Auth0_c {
109
110
  })=>{
110
111
  event.preventDefault();
111
112
  const { email_input , password_input , password_confirmation_input , } = ctx;
112
- const email = email_input.value;
113
+ const username = email_input.value;
113
114
  const password = password_input.value;
114
115
  const password_confirmation = password_confirmation_input.value;
115
116
  const auth0_token_error = validate_auth0_signup({
116
- email,
117
+ username,
117
118
  password,
118
119
  password_confirmation
119
120
  });
@@ -122,7 +123,7 @@ export class Auth0_c {
122
123
  return false;
123
124
  }
124
125
  await this.signup({
125
- email,
126
+ username,
126
127
  password
127
128
  }, schedule_forms_clear);
128
129
  return;
@@ -155,8 +156,7 @@ export class Auth0_c {
155
156
  await this.post_auth0_passwordless_start(this.login_auth0_body_(data));
156
157
  this.open_auth0_forgot_password_check_email();
157
158
  };
158
- this.onsubmit_change_password = async (event, ctx, schedule_forms_clear = ()=>{
159
- })=>{
159
+ this.onsubmit_change_password = async (event, ctx, schedule_forms_clear = noop)=>{
160
160
  event.preventDefault();
161
161
  const { password_input , password_confirmation_input , } = ctx;
162
162
  const password = password_input.value;