@ctx-core/auth0-ui 13.0.0 → 14.0.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 (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +16 -43
  3. package/src/auth0__script__html_/index.d.ts +6 -0
  4. package/src/{auth0__script__html_.ts → auth0__script__html_/index.js} +4 -6
  5. package/src/auth0__ui__o_key/index.d.ts +1 -0
  6. package/src/{auth0__ui__o_key.ts → auth0__ui__o_key/index.js} +0 -0
  7. package/src/index.d.ts +2 -0
  8. package/src/index.js +2 -0
  9. package/.swcrc +0 -10
  10. package/lib/auth0__script__html_.js +0 -35
  11. package/lib/auth0__script__html_.js.map +0 -1
  12. package/lib/auth0__ui__o__getContext.js +0 -7
  13. package/lib/auth0__ui__o__getContext.js.map +0 -1
  14. package/lib/auth0__ui__o_key.js +0 -3
  15. package/lib/auth0__ui__o_key.js.map +0 -1
  16. package/lib/index.js +0 -6
  17. package/lib/index.js.map +0 -1
  18. package/lib/src/auth0__script__html_.d.ts +0 -2
  19. package/lib/src/auth0__ui__o__getContext.d.ts +0 -2
  20. package/lib/src/auth0__ui__o_key.d.ts +0 -1
  21. package/lib/src/index.d.ts +0 -4
  22. package/lib/src/ui/Auth0_c.d.ts +0 -48
  23. package/lib/src/ui/index.d.ts +0 -8
  24. package/lib/ui/Auth0.svelte +0 -168
  25. package/lib/ui/Auth0_Change_Password_Form.svelte +0 -91
  26. package/lib/ui/Auth0_Dialog_Close.svelte +0 -9
  27. package/lib/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +0 -10
  28. package/lib/ui/Auth0_Forgot_Password_Form.svelte +0 -61
  29. package/lib/ui/Auth0_Login_Form.svelte +0 -83
  30. package/lib/ui/Auth0_Signup_Form.svelte +0 -117
  31. package/lib/ui/Auth0_c.js +0 -172
  32. package/lib/ui/Auth0_c.js.map +0 -1
  33. package/lib/ui/index.js +0 -10
  34. package/lib/ui/index.js.map +0 -1
  35. package/src/auth0__ui__o__getContext.ts +0 -6
  36. package/src/index.ts +0 -4
  37. package/src/ui/Auth0.svelte +0 -168
  38. package/src/ui/Auth0_Change_Password_Form.svelte +0 -91
  39. package/src/ui/Auth0_Dialog_Close.svelte +0 -9
  40. package/src/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +0 -10
  41. package/src/ui/Auth0_Forgot_Password_Form.svelte +0 -61
  42. package/src/ui/Auth0_Login_Form.svelte +0 -83
  43. package/src/ui/Auth0_Signup_Form.svelte +0 -117
  44. package/src/ui/Auth0_c.ts +0 -251
  45. package/src/ui/index.ts +0 -8
  46. package/svelte.config.js +0 -16
@@ -1,83 +0,0 @@
1
- <script lang="ts">
2
- import {
3
- AUTH0_DOMAIN__, auth0__token__error__, auth0__token__error_txt__, auth0__forgot_password__open, auth0__signup__open
4
- } from '@ctx-core/auth0'
5
- import { type Ctx } from '@ctx-core/object'
6
- import { Auth0_c } from './Auth0_c.js'
7
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
8
- export let ctx:Ctx, error_class = '', input_class = '', button_class = '', label_class = '.js'
9
- const auth0__token__error_ = auth0__token__error__(ctx)
10
- const auth0_token_error_txt_ = auth0__token__error_txt__(ctx)
11
- const AUTH0_DOMAIN = AUTH0_DOMAIN__(ctx)
12
- const _ = new Auth0_c(ctx)
13
- let root:HTMLDivElement
14
- let username_login_input:HTMLInputElement, password_login_input:HTMLInputElement
15
- let error_username:string|undefined//region
16
- $: error_username = $auth0_token_error_?.username //endregion
17
- let error_password:string|undefined//region
18
- $: error_password = $auth0_token_error_?.password //endregion
19
- </script>
20
-
21
- <div bind:this={root} class="form {$$props.class||''}">
22
- <Auth0_Dialog_Close></Auth0_Dialog_Close>
23
- <h1><slot name="login_text">Welcome</slot></h1>
24
- <form
25
- action="https://{$AUTH0_DOMAIN}/oauth/token"
26
- accept-charset="UTF-8"
27
- method="post"
28
- on:submit={event =>
29
- _.login__onsubmit(event, {
30
- username_login_input,
31
- password_login_input
32
- }, ()=>_.forms__clear__schedule(root))}
33
- >
34
- {#if $auth0_token_error_txt_}
35
- <ul>
36
- <li class="error {error_class}">
37
- {$auth0_token_error_txt_}
38
- </li>
39
- </ul>
40
- {/if}
41
- <fieldset>
42
- <label class="field">
43
- <div class={label_class}>Email</div>
44
- <input
45
- bind:this={username_login_input}
46
- placeholder="your@email.com"
47
- required="required"
48
- class="form-control {input_class}"
49
- class:invalid={error_username}
50
- type="email"
51
- id="username-login"
52
- name="username"/>
53
- </label>
54
- <label class="field">
55
- <div class={label_class}>Password</div>
56
- <input
57
- bind:this={password_login_input}
58
- placeholder="**********"
59
- required="required"
60
- class={input_class}
61
- class:invalid={error_password}
62
- id="password-login"
63
- type="password"
64
- name="password"/>
65
- </label>
66
- </fieldset>
67
- <footer>
68
- <input
69
- type="submit"
70
- value="Login"
71
- class="button {button_class}"
72
- />
73
- <label
74
- class="auth_navigation {label_class}"
75
- on:click={()=>auth0__signup__open(ctx)}
76
- >Don't have an account? Signup&hellip;</label>
77
- <label
78
- class="auth_navigation {label_class}"
79
- on:click={()=>auth0__forgot_password__open(ctx)}
80
- >Forgot Password?</label>
81
- </footer>
82
- </form>
83
- </div>
@@ -1,117 +0,0 @@
1
- <script lang="ts">
2
- import {
3
- AUTH0_DOMAIN__, auth0__token__error__, auth0__forgot_password__open, auth0__login__open,
4
- } from '@ctx-core/auth0'
5
- import { auth0__ui__o__getContext } from '../auth0__ui__o__getContext.js'
6
- import { Auth0_c } from './Auth0_c.js'
7
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
8
- export let error_class = '', input_class = '', button_class = '', label_class = '.js'
9
- const ctx = auth0__ui__o__getContext()
10
- const AUTH0_DOMAIN_ = AUTH0_DOMAIN__(ctx)
11
- const auth0__token__error_ = auth0__token__error__(ctx)
12
- const _ = new Auth0_c(ctx)
13
- let root, signup_email_input, signup_password_input, signup_password_confirmation_input
14
- let error_username:string|undefined //region
15
- $: error_username = $auth0_token_error_?.username //endregion
16
- let error_password:string|undefined //region
17
- $: error_password = $auth0_token_error_?.password //endregion
18
- let error_password_confirmation:boolean //region
19
- $: error_password_confirmation = !!$auth0_token_error_ //endregion
20
- let error_text:string
21
- $: {
22
- let error_text_a = []
23
- if ($auth0_token_error_) {
24
- for (let key in $auth0_token_error_) {
25
- error_text_a.push($auth0_token_error_[key])
26
- }
27
- }
28
- error_text = error_text_a.join('<br>') || ''
29
- }
30
- </script>
31
-
32
- <div bind:this={root} class="form signup">
33
- <Auth0_Dialog_Close/>
34
- <h1><slot name="signup_text">Sign Up</slot></h1>
35
- <form
36
- action="https://{$AUTH0_DOMAIN_}/dbconnections/signup"
37
- accept-charset="UTF-8"
38
- method="post"
39
- on:submit={event =>
40
- _.signup__onsubmit(event, {
41
- signup_email_input,
42
- signup_password_input,
43
- signup_password_confirmation_input
44
- }, _.forms__clear__schedule(root))
45
- }
46
- >
47
- {#if $auth0_token_error_}
48
- <ul>
49
- <li class="error {error_class}">
50
- {error_text}
51
- </li>
52
- </ul>
53
- {/if}
54
- <fieldset>
55
- <label class="field">
56
- <div class={label_class}>Email</div>
57
- <input
58
- bind:this={signup_email_input}
59
- placeholder="your@email.com"
60
- required="required"
61
- autocomplete="email"
62
- class="form-control {input_class}"
63
- class:invalid={error_username}
64
- type="email"
65
- id="email-signup"
66
- name="email"/>
67
- </label>
68
- <label class="field">
69
- <div class={label_class}>Password</div>
70
- <input
71
- bind:this={signup_password_input}
72
- placeholder="**********"
73
- required="required"
74
- class={input_class}
75
- class:invalid={error_password}
76
- id="password-signup"
77
- type="password"
78
- name="password"/>
79
- </label>
80
- <label class="field">
81
- <div class={label_class}>Confirm Password</div>
82
- <input
83
- bind:this={signup_password_confirmation_input}
84
- placeholder="**********"
85
- required="required"
86
- class={input_class}
87
- class:invalid={error_password_confirmation}
88
- type="password"
89
- name="password_confirmation"
90
- id="password_confirmation-signup"/>
91
- </label>
92
- <slot name="tos__signup">
93
- <p>
94
- By clicking ‘Sign up’ you agree to the terms of this Website <br>
95
- <a href="." target="_blank">Terms of Service</a>
96
- and
97
- <a href="." target="_blank">Privacy Policy</a>
98
- </p>
99
- </slot>
100
- </fieldset>
101
- <footer>
102
- <input
103
- type="submit"
104
- value="Sign up"
105
- class="button {button_class}"
106
- />
107
- <label
108
- class="auth_navigation {label_class}"
109
- on:click={()=>auth0__login__open(ctx)}
110
- >Have an account? Log in&hellip;</label>
111
- <label
112
- class="auth_navigation {label_class}"
113
- on:click={()=>auth0__forgot_password__open(ctx)}
114
- >Forgot Password?</label>
115
- </footer>
116
- </form>
117
- </div>
package/lib/ui/Auth0_c.js DELETED
@@ -1,172 +0,0 @@
1
- import { auth0__body_, auth0__opened__class__, auth0__token__error__, auth0__token__json__, auth0__token__error__clear, auth0__close, auth0__token__error__logout, auth0__forgot_password__check_email__open, auth0__login__open, password_realm__body_, auth0__change_password__fetch_post, auth0__dbconnections_signup__fetch_get, auth0__oauth_token__fetch_post, auth0__passwordless_start__fetch_post, auth0__change_password__validate, auth0__forgot_password__validate, auth0__signup__validate } from '@ctx-core/auth0';
2
- import { dom_a_, has_dom } from '@ctx-core/dom';
3
- import { noop } from '@ctx-core/function';
4
- import { onDestroy } from 'svelte';
5
- export class Auth0_c {
6
- constructor(ctx){
7
- this.ctx = ctx;
8
- this.auth0__login__body_ = (data)=>auth0__body_(this.ctx, data);
9
- this.auth0__login__password_realm__body_ = (data)=>password_realm__body_(this.ctx, this.auth0__login__body_(data));
10
- this.auth0__signup__body_ = (data)=>auth0__body_(this.ctx, data);
11
- this.auth0__signup__password_realm__body_ = (data)=>password_realm__body_(this.ctx, this.auth0__signup__body_(data));
12
- this.auth0__opened__class = auth0__opened__class__(this.ctx);
13
- this.auth0__token__json_ = auth0__token__json__(this.ctx);
14
- this.auth0__token__error_ = auth0__token__error__(this.ctx);
15
- this.auth0__close = ()=>auth0__close(this.ctx);
16
- this.onMount = async (root)=>{
17
- if (has_dom) {
18
- const unsubscribe = this.auth0__opened__class.subscribe(()=>this.forms__clear__schedule(root));
19
- onDestroy(unsubscribe);
20
- }
21
- };
22
- this.login = async (data, forms__clear__schedule = ()=>{})=>{
23
- const [auth0_token, response] = await auth0__oauth_token__fetch_post(this.ctx, this.auth0__login__password_realm__body_(data));
24
- if (response.ok) {
25
- const auth0_token_json = JSON.stringify(auth0_token);
26
- this.auth0__token__json_.$ = auth0_token_json;
27
- forms__clear__schedule();
28
- this.auth0__close();
29
- } else {
30
- const auth_token_error = auth0_token;
31
- this.auth0__token__error_.$ = auth_token_error;
32
- auth0__token__error__logout(this.ctx, auth_token_error);
33
- }
34
- };
35
- this.signup = async (data, forms__clear__schedule = ()=>{})=>{
36
- const [auth0_userinfo] = await auth0__dbconnections_signup__fetch_get(this.ctx, this.auth0__signup__password_realm__body_(data));
37
- const auth0_userinfo_Auth0Error = auth0_userinfo;
38
- const { statusCode } = auth0_userinfo_Auth0Error;
39
- if (statusCode) {
40
- const { code , description } = auth0_userinfo_Auth0Error;
41
- const email = code === 'user_exists' ? 'This Email is already signed up' : description || '';
42
- const auth0_token_error = {
43
- email
44
- };
45
- auth0__token__error__logout(this.ctx, auth0_token_error);
46
- return;
47
- }
48
- forms__clear__schedule();
49
- await this.login({
50
- username: data.email,
51
- password: data.password
52
- }, forms__clear__schedule);
53
- };
54
- this.change_password = async (form, forms__clear__schedule = ()=>{})=>{
55
- const { password } = form;
56
- let error;
57
- try {
58
- const [response_json, response] = await auth0__change_password__fetch_post(this.ctx, password);
59
- if (!response.ok) {
60
- if (response.status == 401) {
61
- auth0__login__open(this.ctx);
62
- const auth0_token_error = {
63
- username: 'Authentication Error - Log in'
64
- };
65
- auth0__token__error__logout(this.ctx, auth0_token_error);
66
- return;
67
- }
68
- error = response_json.error || 'Error changing Password';
69
- }
70
- } catch (e) {
71
- console.warn(e);
72
- error = e.message;
73
- }
74
- if (error) {
75
- const auth0_token_error = {
76
- password: error
77
- };
78
- auth0__token__error__logout(this.ctx, auth0_token_error);
79
- return;
80
- }
81
- forms__clear__schedule();
82
- this.auth0__close();
83
- };
84
- this.forms__clear__schedule_ = (root)=>{
85
- return ()=>this.forms__clear__schedule(root);
86
- };
87
- this.forms__clear__schedule = (root)=>{
88
- setTimeout(()=>{
89
- auth0__token__error__clear(this.ctx);
90
- inputs__clear(dom_a_('input[type=text]', root));
91
- inputs__clear(dom_a_('input[type=password]', root));
92
- }, 100);
93
- };
94
- this.signup__onsubmit = async (event, ctx, forms__clear__schedule = ()=>{})=>{
95
- event.preventDefault();
96
- const { email_input , password_input , password_confirmation_input } = ctx;
97
- const email = email_input.value;
98
- const password = password_input.value;
99
- const password_confirmation = password_confirmation_input.value;
100
- const auth0_token_error = auth0__signup__validate({
101
- email,
102
- password,
103
- password_confirmation
104
- });
105
- if (auth0_token_error) {
106
- auth0__token__error__logout(this.ctx, auth0_token_error);
107
- return false;
108
- }
109
- await this.signup({
110
- email,
111
- password
112
- }, forms__clear__schedule);
113
- return;
114
- };
115
- this.login__onsubmit = async (event, ctx, forms__clear__schedule = ()=>{})=>{
116
- event.preventDefault();
117
- const { username_login_input , password_login_input } = ctx;
118
- const username = username_login_input.value;
119
- const password = password_login_input.value;
120
- await this.login({
121
- username,
122
- password
123
- }, forms__clear__schedule);
124
- };
125
- this.forgot_password__onsubmit = async (event, ctx)=>{
126
- event.preventDefault();
127
- const { email_input } = ctx;
128
- const email = email_input.value;
129
- const data = {
130
- connection: 'email',
131
- send: 'link',
132
- email
133
- };
134
- const auth0_token_error = auth0__forgot_password__validate(data);
135
- if (auth0_token_error) {
136
- auth0__token__error__logout(this.ctx, auth0_token_error);
137
- return;
138
- }
139
- await auth0__passwordless_start__fetch_post(this.ctx, this.auth0__login__body_(data));
140
- auth0__forgot_password__check_email__open(this.ctx);
141
- };
142
- this.change_password__onsubmit = async (event, ctx, forms__clear__schedule = noop)=>{
143
- event.preventDefault();
144
- const { password_input , password_confirmation_input } = ctx;
145
- const password = password_input.value;
146
- const password_confirmation = password_confirmation_input.value;
147
- const auth0_token_error = auth0__change_password__validate({
148
- password,
149
- password_confirmation
150
- });
151
- if (auth0_token_error) {
152
- auth0__token__error__logout(this.ctx, auth0_token_error);
153
- throw auth0_token_error;
154
- }
155
- return await this.change_password({
156
- password
157
- }, forms__clear__schedule);
158
- };
159
- this.onclose = async (event)=>{
160
- event.preventDefault();
161
- this.auth0__close();
162
- };
163
- }
164
- }
165
- function inputs__clear(inputs) {
166
- for(let i = 0; i < inputs.length; i++){
167
- const input = inputs[i];
168
- input.value = '';
169
- }
170
- }
171
-
172
- //# sourceMappingURL=Auth0_c.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/Auth0_c.ts"],"sourcesContent":["import type {\n\tauth0__client_id__body_T,\n\tauth0__grant_type__body_T,\n\tauth0__login_data_T,\n\tpassword_realm__body_T,\n\tauth0__oauth_token__fetch__body_T,\n\tauth0__passwordless_start__fetch__body_T,\n\tauth0__passwordless_start__fetch__optional_body_T,\n\tauth0__signup_data_T\n} from '@ctx-core/auth0'\nimport {\n\tauth0__body_,\n\tauth0__opened__class__,\n\tauth0__token__error__,\n\tauth0__token__json__,\n\tauth0__token__error__clear,\n\tauth0__close,\n\tauth0__token__error__logout,\n\tauth0__forgot_password__check_email__open,\n\tauth0__login__open,\n\tpassword_realm__body_,\n\tauth0__change_password__fetch_post,\n\tauth0__dbconnections_signup__fetch_get,\n\tauth0__oauth_token__fetch_post,\n\tauth0__passwordless_start__fetch_post,\n\tauth0__change_password__validate,\n\tauth0__forgot_password__validate,\n\tauth0__signup__validate\n} from '@ctx-core/auth0'\nimport { dom_a_, has_dom } from '@ctx-core/dom'\nimport { noop } from '@ctx-core/function'\nimport type { Ctx } from '@ctx-core/object'\nimport type { Auth0Error } from 'auth0-js'\nimport { onDestroy } from 'svelte'\nexport class Auth0_c {\n\tconstructor(protected ctx:Ctx) {}\n\treadonly auth0__login__body_ = (data:any)=>\n\t\tauth0__body_<login__password_realm__body_T>(\n\t\t\tthis.ctx, data\n\t\t)\n\treadonly auth0__login__password_realm__body_ = (data:any)=>\n\t\tpassword_realm__body_<login__password_realm__body_T>(\n\t\t\tthis.ctx,\n\t\t\tthis.auth0__login__body_(data)\n\t\t)\n\treadonly auth0__signup__body_ = (data:any)=>\n\t\tauth0__body_<signup__password_realm__body_T>(this.ctx, data) as signup__password_realm__body_T\n\treadonly auth0__signup__password_realm__body_ = (data:any)=>\n\t\tpassword_realm__body_<signup__password_realm__body_T>(this.ctx, this.auth0__signup__body_(data))\n\treadonly auth0__opened__class = auth0__opened__class__(this.ctx)\n\treadonly auth0__token__json_ = auth0__token__json__(this.ctx)\n\treadonly auth0__token__error_ = auth0__token__error__(this.ctx)\n\treadonly auth0__close = ()=>auth0__close(this.ctx)\n\treadonly onMount = async (root:HTMLElement)=>{\n\t\tif (has_dom) {\n\t\t\tconst unsubscribe =\n\t\t\t\tthis.auth0__opened__class.subscribe(()=>this.forms__clear__schedule(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:auth0__login_data_T, forms__clear__schedule = ()=>{})=>{\n\t\tconst [auth0_token, response] = await auth0__oauth_token__fetch_post(\n\t\t\tthis.ctx, this.auth0__login__password_realm__body_(data)\n\t\t)\n\t\tif (response.ok) {\n\t\t\tconst auth0_token_json = JSON.stringify(auth0_token)\n\t\t\tthis.auth0__token__json_.$ = auth0_token_json\n\t\t\tforms__clear__schedule()\n\t\t\tthis.auth0__close()\n\t\t} else {\n\t\t\tconst auth_token_error = auth0_token as Auth0Error\n\t\t\tthis.auth0__token__error_.$ = auth_token_error\n\t\t\tauth0__token__error__logout(this.ctx, auth_token_error)\n\t\t}\n\t}\n\treadonly signup = async (data:auth0__signup_data_T, forms__clear__schedule = ()=>{})=>{\n\t\tconst [auth0_userinfo] = await auth0__dbconnections_signup__fetch_get(\n\t\t\tthis.ctx,\n\t\t\tthis.auth0__signup__password_realm__body_(data))\n\t\tconst auth0_userinfo_Auth0Error = auth0_userinfo as Auth0Error\n\t\tconst { statusCode } = auth0_userinfo_Auth0Error\n\t\tif (statusCode) {\n\t\t\tconst {\n\t\t\t\tcode,\n\t\t\t\tdescription\n\t\t\t} = auth0_userinfo_Auth0Error\n\t\t\tconst email =\n\t\t\t\tcode === 'user_exists'\n\t\t\t\t? 'This Email is already signed up'\n\t\t\t\t: description || ''\n\t\t\tconst auth0_token_error = { email }\n\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tforms__clear__schedule()\n\t\tawait this.login({\n\t\t\tusername: data.email,\n\t\t\tpassword: data.password,\n\t\t}, forms__clear__schedule)\n\t}\n\treadonly change_password = async (form:{ password:string }, forms__clear__schedule = ()=>{})=>{\n\t\tconst { password } = form\n\t\tlet error\n\t\ttry {\n\t\t\tconst [response_json, response] = await auth0__change_password__fetch_post(this.ctx, password)\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status == 401) {\n\t\t\t\t\tauth0__login__open(this.ctx)\n\t\t\t\t\tconst auth0_token_error = { username: 'Authentication Error - Log in' }\n\t\t\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\terror = response_json.error || 'Error changing Password'\n\t\t\t}\n\t\t} catch (e:any) {\n\t\t\tconsole.warn(e)\n\t\t\terror = e.message\n\t\t}\n\t\tif (error) {\n\t\t\tconst auth0_token_error = { password: error }\n\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tforms__clear__schedule()\n\t\tthis.auth0__close()\n\t}\n\treadonly forms__clear__schedule_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.forms__clear__schedule(root)\n\t}\n\treadonly forms__clear__schedule = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tauth0__token__error__clear(this.ctx)\n\t\t\tinputs__clear(dom_a_('input[type=text]', root))\n\t\t\tinputs__clear(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly signup__onsubmit = async (event:Event, ctx:signup__onsubmit__o_T, forms__clear__schedule = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\temail_input,\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst email = email_input.value\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tauth0__signup__validate({\n\t\t\t\temail,\n\t\t\t\tpassword,\n\t\t\t\tpassword_confirmation\n\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\treturn false\n\t\t}\n\t\tawait this.signup({\n\t\t\temail,\n\t\t\tpassword\n\t\t}, forms__clear__schedule)\n\t\treturn\n\t}\n\treadonly login__onsubmit = async (event:Event, ctx:login__onsubmit__o_T, forms__clear__schedule = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst { username_login_input, password_login_input } = ctx\n\t\tconst username = username_login_input.value\n\t\tconst password = password_login_input.value\n\t\tawait this.login({ username, password }, forms__clear__schedule)\n\t}\n\treadonly forgot_password__onsubmit = async (event:Event, ctx:forgot_password__onsubmit__o_T)=>{\n\t\tevent.preventDefault()\n\t\tconst { email_input } = ctx\n\t\tconst email = email_input.value\n\t\tconst data:auth0__passwordless_start__fetch__optional_body_T = {\n\t\t\tconnection: 'email',\n\t\t\tsend: 'link',\n\t\t\temail\n\t\t}\n\t\tconst auth0_token_error = auth0__forgot_password__validate(data)\n\t\tif (auth0_token_error) {\n\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tawait auth0__passwordless_start__fetch_post(\n\t\t\tthis.ctx, this.auth0__login__body_(data) as auth0__passwordless_start__fetch__body_T\n\t\t)\n\t\tauth0__forgot_password__check_email__open(this.ctx)\n\t}\n\treadonly change_password__onsubmit = async (\n\t\tevent:Event, ctx:change_password__onsubmit__o_T, forms__clear__schedule = noop\n\t)=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tauth0__change_password__validate(\n\t\t\t\t{\n\t\t\t\t\tpassword,\n\t\t\t\t\tpassword_confirmation\n\t\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tauth0__token__error__logout(this.ctx, auth0_token_error)\n\t\t\tthrow auth0_token_error\n\t\t}\n\t\treturn await this.change_password({ password }, forms__clear__schedule)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.auth0__close()\n\t}\n}\nfunction inputs__clear(inputs:NodeList) {\n\tfor (let i = 0; i < inputs.length; i++) {\n\t\tconst input = inputs[i] as HTMLInputElement\n\t\tinput.value = ''\n\t}\n}\nexport interface signup__password_realm__body_T\n\textends auth0__signup_data_T,\n\t\tauth0__client_id__body_T,\n\t\tauth0__passwordless_start__fetch__body_T,\n\t\tpassword_realm__body_T,\n\t\tauth0__grant_type__body_T,\n\t\tauth0__oauth_token__fetch__body_T {}\nexport interface login__password_realm__body_T\n\textends auth0__login_data_T,\n\t\tauth0__client_id__body_T,\n\t\tauth0__passwordless_start__fetch__body_T,\n\t\tpassword_realm__body_T,\n\t\tauth0__grant_type__body_T,\n\t\tauth0__oauth_token__fetch__body_T {}\nexport interface change_password__onsubmit__o_T {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface forgot_password__onsubmit__o_T {\n\temail_input:HTMLInputElement\n}\nexport interface login__onsubmit__o_T {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface signup__onsubmit__o_T {\n\temail_input:HTMLInputElement\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\n"],"names":["auth0__body_","auth0__opened__class__","auth0__token__error__","auth0__token__json__","auth0__token__error__clear","auth0__close","auth0__token__error__logout","auth0__forgot_password__check_email__open","auth0__login__open","password_realm__body_","auth0__change_password__fetch_post","auth0__dbconnections_signup__fetch_get","auth0__oauth_token__fetch_post","auth0__passwordless_start__fetch_post","auth0__change_password__validate","auth0__forgot_password__validate","auth0__signup__validate","dom_a_","has_dom","noop","onDestroy","Auth0_c","constructor","ctx","auth0__login__body_","data","auth0__login__password_realm__body_","auth0__signup__body_","auth0__signup__password_realm__body_","auth0__opened__class","auth0__token__json_","auth0__token__error_","onMount","root","unsubscribe","subscribe","forms__clear__schedule","login","auth0_token","response","ok","auth0_token_json","JSON","stringify","$","auth_token_error","signup","auth0_userinfo","auth0_userinfo_Auth0Error","statusCode","code","description","email","auth0_token_error","username","password","change_password","form","error","response_json","status","e","console","warn","message","forms__clear__schedule_","setTimeout","inputs__clear","signup__onsubmit","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","login__onsubmit","username_login_input","password_login_input","forgot_password__onsubmit","connection","send","change_password__onsubmit","onclose","inputs","i","length","input"],"mappings":"AAUA,SACCA,YAAY,EACZC,sBAAsB,EACtBC,qBAAqB,EACrBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,YAAY,EACZC,2BAA2B,EAC3BC,yCAAyC,EACzCC,kBAAkB,EAClBC,qBAAqB,EACrBC,kCAAkC,EAClCC,sCAAsC,EACtCC,8BAA8B,EAC9BC,qCAAqC,EACrCC,gCAAgC,EAChCC,gCAAgC,EAChCC,uBAAuB,QACjB,kBAAiB;AACxB,SAASC,MAAM,EAAEC,OAAO,QAAQ,gBAAe;AAC/C,SAASC,IAAI,QAAQ,qBAAoB;AAGzC,SAASC,SAAS,QAAQ,SAAQ;AAClC,OAAO,MAAMC;IACZC,YAAsBC,IAAS;mBAATA;aACbC,sBAAsB,CAACC,OAC/BzB,aACC,IAAI,CAACuB,GAAG,EAAEE;aAEHC,sCAAsC,CAACD,OAC/ChB,sBACC,IAAI,CAACc,GAAG,EACR,IAAI,CAACC,mBAAmB,CAACC;aAElBE,uBAA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ACU,GAAG,EAAE,IAAI,CAACC,mBAAmB,CAACC;YAEpClB,0CAA0C,IAAI,CAACgB,GAAG;QACnD;aACS2D,4BAA4B,OACpCb,OAAa9C,KAAoCa,yBAAyBjB,IAAI,GAC5E;YACFkD,MAAMC,cAAc;YACpB,MAAM,EACLE,eAAc,EACdC,4BAA2B,EAC3B,GAAGlD;YACJ,MAAMgC,WAAWiB,eAAeE,KAAK;YACrC,MAAMC,wBAAwBF,4BAA4BC,KAAK;YAC/D,MAAMrB,oBACLvC,iCACC;gBACCyC;gBACAoB;YACD;YACF,IAAItB,mBAAmB;gBACtB/C,4BAA4B,IAAI,CAACiB,GAAG,EAAE8B;gBACtC,MAAMA,kBAAiB;YACxB,CAAC;YACD,OAAO,MAAM,IAAI,CAACG,eAAe,CAAC;gBAAED;YAAS,GAAGnB;QACjD;aACS+C,UAAU,OAAOd,QAAmB;YAC5CA,MAAMC,cAAc;YACpB,IAAI,CAACjE,YAAY;QAClB;IAlLgC;AAmLjC,CAAC;AACD,SAAS8D,cAAciB,MAAe,EAAE;IACvC,IAAK,IAAIC,IAAI,GAAGA,IAAID,OAAOE,MAAM,EAAED,IAAK;QACvC,MAAME,QAAQH,MAAM,CAACC,EAAE;QACvBE,MAAMb,KAAK,GAAG;IACf;AACD"}
package/lib/ui/index.js DELETED
@@ -1,10 +0,0 @@
1
- import 'svelte';
2
- export * as Auth0 from './Auth0.svelte';
3
- export * as Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte';
4
- export * as Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte';
5
- export * as Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte';
6
- export * as Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte';
7
- export * as Auth0_Login_Form from './Auth0_Login_Form.svelte';
8
- export * as Auth0_Signup_Form from './Auth0_Signup_Form.svelte';
9
-
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["import 'svelte'\nexport * as Auth0 from './Auth0.svelte'\nexport * as Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'\nexport * as Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'\nexport * as Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'\nexport * as Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'\nexport * as Auth0_Login_Form from './Auth0_Login_Form.svelte'\nexport * as Auth0_Signup_Form from './Auth0_Signup_Form.svelte'\n"],"names":["Auth0","Auth0_Dialog_Close","Auth0_Change_Password_Form","Auth0_Forgot_Password_Check_Email_Form","Auth0_Forgot_Password_Form","Auth0_Login_Form","Auth0_Signup_Form"],"mappings":"AAAA,OAAO,SAAQ;AACf,OAAO,KAAKA,KAAK,MAAM,iBAAgB;AACvC,OAAO,KAAKC,kBAAkB,MAAM,8BAA6B;AACjE,OAAO,KAAKC,0BAA0B,MAAM,sCAAqC;AACjF,OAAO,KAAKC,sCAAsC,MAAM,kDAAiD;AACzG,OAAO,KAAKC,0BAA0B,MAAM,sCAAqC;AACjF,OAAO,KAAKC,gBAAgB,MAAM,4BAA2B;AAC7D,OAAO,KAAKC,iBAAiB,MAAM,6BAA4B"}
@@ -1,6 +0,0 @@
1
- import { getContext } from 'svelte'
2
- import type { Ctx } from '@ctx-core/object'
3
- import { auth0__ui__o_key } from './auth0__ui__o_key.js'
4
- export function auth0__ui__o__getContext() {
5
- return getContext(auth0__ui__o_key) as Ctx
6
- }
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './auth0__ui__o_key.js'
2
- export * from './auth0__script__html_.js'
3
- export * from './auth0__ui__o__getContext.js'
4
- export * from './ui/index.js'
@@ -1,168 +0,0 @@
1
- <script lang="ts">
2
- import { setContext } from 'svelte'
3
- import {
4
- auth0__forgot_password__opened__, auth0__opened__class__, auth0__login__opened__, auth0__signup__opened__,
5
- auth0__forgot_password__check_email__opened__, auth0__change_password__opened__
6
- } from '@ctx-core/auth0'
7
- import { ctx_ } from '@ctx-core/object'
8
- import { auth0__ui__o_key } from '../auth0__ui__o_key.js'
9
- import { Auth0_c } from './Auth0_c.js'
10
- import Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'
11
- import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
12
- import Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'
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 = ctx_(), dialog = false
17
- setContext(auth0__ui__o_key, ctx)
18
- const auth0_change_password_opened_ = auth0__change_password__opened__(ctx)
19
- const auth0_opened_class_ = auth0__opened__class__(ctx)
20
- const auth0_forgot_password_check_email_opened_ = auth0__forgot_password__check_email__opened__(ctx)
21
- const auth0_forgot_password_opened_ = auth0__forgot_password__opened__(ctx)
22
- const auth0_login_opened_ = auth0__login__opened__(ctx)
23
- const auth0_signup_opened_ = auth0__signup__opened__(ctx)
24
- const _ = new Auth0_c(ctx)
25
- </script>
26
-
27
- <div
28
- class="Auth0 {$auth0_opened_class_} {$$props.class || ''}"
29
- class:dialog
30
- class:visible={!!$auth0_opened_class_}
31
- >
32
- <Auth0_Dialog_Close></Auth0_Dialog_Close>
33
- {#if $auth0_login_opened_}
34
- <Auth0_Login_Form {...$$props}></Auth0_Login_Form>
35
- {:else if $auth0_signup_opened_}
36
- <Auth0_Signup_Form {...$$props}>
37
- <div slot="tos__signup"></div>
38
- </Auth0_Signup_Form>
39
- {:else if $auth0_forgot_password_opened_}
40
- <Auth0_Forgot_Password_Form {...$$props}></Auth0_Forgot_Password_Form>
41
- {:else if $auth0_forgot_password_check_email_opened_}
42
- <Auth0_Forgot_Password_Check_Email_Form></Auth0_Forgot_Password_Check_Email_Form>
43
- {:else if $auth0_change_password_opened_}
44
- <Auth0_Change_Password_Form {...$$props}></Auth0_Change_Password_Form>
45
- {/if}
46
- <slot></slot>
47
- </div>
48
-
49
- <style lang="scss">
50
- :global(.Auth0) {
51
- display: block;
52
- overflow: hidden;
53
- &.dialog {
54
- :global(div) {
55
- :global(.close) {
56
- display: block;
57
- }
58
- }
59
- }
60
- :global(h1) {
61
- font-size: 2rem;
62
- text-align: center;
63
- }
64
- [name=auth_navigation] {
65
- display: none;
66
- ~ .form {
67
- display: none;
68
- }
69
- &.auth_navigation-signup:checked {
70
- ~ .signup {
71
- display: block;
72
- }
73
- }
74
- &.auth_navigation-login:checked {
75
- ~ .login {
76
- display: block;
77
- }
78
- }
79
- &.auth_navigation-forgot_password:checked {
80
- ~ .forgot_password {
81
- display: block;
82
- }
83
- }
84
- &.auth_navigation-forgot_password_check_email:checked {
85
- ~ .forgot_password_check_email {
86
- display: block;
87
- }
88
- }
89
- &.auth_navigation-change_password:checked {
90
- ~ .change_password {
91
- display: block;
92
- }
93
- }
94
- }
95
- :global(label.auth_navigation) {
96
- color: #3EBBC0;
97
- font-weight: bold;
98
- &:hover {
99
- text-decoration: underline;
100
- }
101
- }
102
- > :global(div) {
103
- position: relative;
104
- height: 100%;
105
- > :global(.close) {
106
- display: none;
107
- position: absolute;
108
- right: 0;
109
- }
110
- }
111
- :global(form) {
112
- :global(input) {
113
- line-height: 1.8rem;
114
- border-color: transparent;
115
- border-bottom: 2px solid lightgrey;
116
- &.invalid {
117
- border-color: red;
118
- }
119
- }
120
- :global(label) {
121
- display: block;
122
- }
123
- :global(fieldset) {
124
- clear: both;
125
- border: none;
126
- :global(.field) {
127
- width: 20em;
128
- margin: 0 auto;
129
- display: block;
130
- clear: both;
131
- text-align: left;
132
- :global(input) {
133
- display: block;
134
- width: 100%;
135
- padding: 0.2em;
136
- color: black;
137
- }
138
- }
139
- :global(p) {
140
- margin-bottom: 0;
141
- -webkit-margin-after: 0;
142
- }
143
- }
144
- :global(footer) {
145
- margin-top: 1rem;
146
- text-align: center;
147
- :global(.button) {
148
- float: none;
149
- width: 10em;
150
- padding: 0.4rem;
151
- color: white;
152
- background-color: #3EBBC0;
153
- border-radius: 5px;
154
- border: none;
155
- &:hover {
156
- background-color: #5CC6CA;
157
- }
158
- }
159
- :global(label) {
160
- margin-top: 1em;
161
- }
162
- }
163
- }
164
- :global(.error) {
165
- color: red;
166
- }
167
- }
168
- </style>