@ctx-core/auth0-ui 10.0.121 → 11.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.swcrc +10 -0
- package/CHANGELOG.md +56 -0
- package/dist/auth0_ui_Ctx.js +2 -1
- package/dist/auth0_ui_Ctx.js.map +1 -1
- package/dist/auth0_ui_ctx_I.generated.js +4 -1
- package/dist/auth0_ui_ctx_I.generated.js.map +1 -1
- package/dist/auth0_ui_ctx_key.js +1 -0
- package/dist/auth0_ui_ctx_key.js.map +1 -1
- package/dist/auth_script_html_.js +2 -1
- package/dist/auth_script_html_.js.map +1 -1
- package/dist/getContext_auth0_ui_ctx.js +1 -0
- package/dist/getContext_auth0_ui_ctx.js.map +1 -1
- package/dist/{index.d.ts → index.browser.js} +2 -2
- package/dist/index.browser.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/Auth0.svelte +168 -0
- package/dist/ui/Auth0_Change_Password_Form.svelte +92 -0
- package/dist/ui/Auth0_Dialog_Close.svelte +10 -0
- package/dist/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +10 -0
- package/dist/ui/Auth0_Forgot_Password_Form.svelte +64 -0
- package/dist/ui/Auth0_Loggedin_If.svelte +14 -0
- package/dist/ui/Auth0_Login_Form.svelte +85 -0
- package/dist/ui/Auth0_Signup_Form.svelte +120 -0
- package/dist/ui/Auth0_c.js +58 -42
- package/dist/ui/Auth0_c.js.map +1 -1
- package/dist/ui/index.js +17 -8
- package/dist/ui/index.js.map +1 -1
- package/package.json +26 -22
- package/src/auth0_ui_ctx_I.generated.ts +2 -12
- package/src/ui/Auth0.svelte +5 -6
- package/src/ui/Auth0_Change_Password_Form.svelte +17 -24
- package/src/ui/Auth0_Dialog_Close.svelte +2 -2
- package/src/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +1 -1
- package/src/ui/Auth0_Forgot_Password_Form.svelte +10 -14
- package/src/ui/Auth0_Loggedin_If.svelte +1 -1
- package/src/ui/Auth0_Login_Form.svelte +25 -29
- package/src/ui/Auth0_Signup_Form.svelte +34 -35
- package/src/ui/Auth0_c.ts +16 -15
- package/dist/auth0_ui_Ctx.d.ts +0 -9
- package/dist/auth0_ui_ctx_I.generated.d.ts +0 -14
- package/dist/auth0_ui_ctx_key.d.ts +0 -1
- package/dist/auth_script_html_.d.ts +0 -2
- package/dist/browser/auth0_ui_ctx_key.d.ts +0 -1
- package/dist/browser/auth0_ui_ctx_key.js +0 -2
- package/dist/browser/auth0_ui_ctx_key.js.map +0 -1
- package/dist/browser/auth_script_html_.d.ts +0 -2
- package/dist/browser/auth_script_html_.js +0 -34
- package/dist/browser/auth_script_html_.js.map +0 -1
- package/dist/browser/getContext_auth0_ui_ctx.d.ts +0 -1
- package/dist/browser/getContext_auth0_ui_ctx.js +0 -6
- package/dist/browser/getContext_auth0_ui_ctx.js.map +0 -1
- package/dist/browser/index.d.ts +0 -3
- package/dist/browser/index.js +0 -4
- package/dist/browser/index.js.map +0 -1
- package/dist/getContext_auth0_ui_ctx.d.ts +0 -1
- package/dist/index.cjs +0 -1
- package/dist/node/index.d.ts +0 -6
- package/dist/node/index.js +0 -7
- package/dist/node/index.js.map +0 -1
- package/dist/node/jwks_cert__b.d.ts +0 -6
- package/dist/node/jwks_cert__b.js +0 -17
- package/dist/node/jwks_cert__b.js.map +0 -1
- package/dist/node/jwks_x5c__b.d.ts +0 -6
- package/dist/node/jwks_x5c__b.js +0 -20
- package/dist/node/jwks_x5c__b.js.map +0 -1
- package/dist/node/jwt_token_decoded__b.d.ts +0 -6
- package/dist/node/jwt_token_decoded__b.js +0 -14
- package/dist/node/jwt_token_decoded__b.js.map +0 -1
- package/dist/node/koa_jwt_token_decoded__b.d.ts +0 -7
- package/dist/node/koa_jwt_token_decoded__b.js +0 -16
- package/dist/node/koa_jwt_token_decoded__b.js.map +0 -1
- package/dist/node/verify_jwt_email__b.d.ts +0 -6
- package/dist/node/verify_jwt_email__b.js +0 -28
- package/dist/node/verify_jwt_email__b.js.map +0 -1
- package/dist/node/verify_jwt_user_id__b.d.ts +0 -6
- package/dist/node/verify_jwt_user_id__b.js +0 -14
- package/dist/node/verify_jwt_user_id__b.js.map +0 -1
- package/dist/ui/Auth0_c.d.ts +0 -55
- package/dist/ui/index.d.ts +0 -9
- package/src/node/index.ts +0 -6
- package/src/node/jwks_cert__b.ts +0 -19
- package/src/node/jwks_x5c__b.ts +0 -21
- package/src/node/jwt_token_decoded__b.ts +0 -15
- package/src/node/koa_jwt_token_decoded__b.ts +0 -19
- package/src/node/verify_jwt_email__b.ts +0 -29
- package/src/node/verify_jwt_user_id__b.ts +0 -15
package/.swcrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @ctx-core/auth0-ui
|
|
2
2
|
|
|
3
|
+
## 11.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: auth0_ui_ctx_I: remove props due to extracting @ctx-core/auth0-service
|
|
8
|
+
|
|
9
|
+
## 11.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @ctx-core/http@9.0.0
|
|
20
|
+
- @ctx-core/auth0@26.0.0
|
|
21
|
+
- @ctx-core/jwt@10.0.28
|
|
22
|
+
- @ctx-core/auth0-management@6.0.102
|
|
23
|
+
|
|
24
|
+
## 11.0.0
|
|
25
|
+
|
|
26
|
+
### Major Changes
|
|
27
|
+
|
|
28
|
+
- extracted @ctx-core/auth0-service from @ctx-core/auth0-ui
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @ctx-core/http@8.0.0
|
|
34
|
+
|
|
35
|
+
## 10.0.123
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- compile using swc
|
|
40
|
+
- Updated dependencies
|
|
41
|
+
- @ctx-core/auth0@25.0.103
|
|
42
|
+
- @ctx-core/auth0-management@6.0.101
|
|
43
|
+
- @ctx-core/dialog@15.0.78
|
|
44
|
+
- @ctx-core/dom@11.0.30
|
|
45
|
+
- @ctx-core/error@11.0.18
|
|
46
|
+
- @ctx-core/fetch@11.0.80
|
|
47
|
+
- @ctx-core/jwt@10.0.27
|
|
48
|
+
- @ctx-core/object@21.0.22
|
|
49
|
+
- @ctx-core/store@27.0.36
|
|
50
|
+
|
|
51
|
+
## 10.0.122
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- update dependencies
|
|
56
|
+
- Updated dependencies [undefined]
|
|
57
|
+
- @ctx-core/auth0-management@6.0.100
|
|
58
|
+
|
|
3
59
|
## 10.0.121
|
|
4
60
|
|
|
5
61
|
### Patch Changes
|
package/dist/auth0_ui_Ctx.js
CHANGED
package/dist/auth0_ui_Ctx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/dist/auth0_ui_ctx_key.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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,"
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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
|
-
|
|
6
|
-
|
|
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
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
|
@@ -0,0 +1,168 @@
|
|
|
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 type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
|
|
8
|
+
import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
|
|
9
|
+
import { Auth0_c } from './Auth0_c.js'
|
|
10
|
+
import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
|
|
11
|
+
import Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'
|
|
12
|
+
import Auth0_Change_Password_Form from './Auth0_Change_Password_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 = {} as auth0_ui_Ctx, dialog = false
|
|
17
|
+
setContext(auth0_ui_ctx_key, ctx)
|
|
18
|
+
const auth0_change_password_opened$ = auth0_change_password_opened$_b(ctx)
|
|
19
|
+
const auth0_opened_class$ = auth0_opened_class$_b(ctx)
|
|
20
|
+
const auth0_forgot_password_check_email_opened$ = auth0_forgot_password_check_email_opened$_b(ctx)
|
|
21
|
+
const auth0_forgot_password_opened$ = auth0_forgot_password_opened$_b(ctx)
|
|
22
|
+
const auth0_login_opened$ = auth0_login_opened$_b(ctx)
|
|
23
|
+
const auth0_signup_opened$ = auth0_signup_opened$_b(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 type="text/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=navigation__auth] {
|
|
65
|
+
display: none;
|
|
66
|
+
~ .form {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
&.navigation__auth-signup:checked {
|
|
70
|
+
~ .signup {
|
|
71
|
+
display: block;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&.navigation__auth-login:checked {
|
|
75
|
+
~ .login {
|
|
76
|
+
display: block;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
&.navigation__auth-forgot_password:checked {
|
|
80
|
+
~ .forgot_password {
|
|
81
|
+
display: block;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
&.navigation__auth-forgot_password_check_email:checked {
|
|
85
|
+
~ .forgot_password_check_email {
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
&.navigation__auth-change_password:checked {
|
|
90
|
+
~ .change_password {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
:global(label.navigation__auth) {
|
|
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>
|
|
@@ -0,0 +1,92 @@
|
|
|
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 = '', input_class = '', button_class = '', label_class = '.js'
|
|
11
|
+
const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
|
|
12
|
+
const auth0_token_error$ = auth0_token_error$_b(ctx)
|
|
13
|
+
const _ = new Auth0_c(ctx)
|
|
14
|
+
let root:HTMLDivElement
|
|
15
|
+
let password_input:HTMLInputElement
|
|
16
|
+
let password_confirmation_input
|
|
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) {
|
|
22
|
+
dispatch('submit__start')
|
|
23
|
+
try {
|
|
24
|
+
await _.onsubmit_change_password(event, {
|
|
25
|
+
password_input,
|
|
26
|
+
password_confirmation_input,
|
|
27
|
+
}, ()=>_.schedule_forms_clear(root))
|
|
28
|
+
dispatch('success')
|
|
29
|
+
} catch (error) {
|
|
30
|
+
dispatch('error', { error })
|
|
31
|
+
throw error
|
|
32
|
+
} finally {
|
|
33
|
+
dispatch('submit__end')
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div bind:this={root} class="form change_password Auth0_Change_Password_Form">
|
|
39
|
+
<Auth0_Dialog_Close></Auth0_Dialog_Close>
|
|
40
|
+
<h1>Change Password</h1>
|
|
41
|
+
<form
|
|
42
|
+
action="https://{$AUTH0_DOMAIN$}/dbconnections/change_password"
|
|
43
|
+
accept-charset="UTF-8"
|
|
44
|
+
method="post"
|
|
45
|
+
on:submit|preventDefault={onsubmit_change_password}
|
|
46
|
+
>
|
|
47
|
+
{#if $auth0_token_error$}
|
|
48
|
+
<ul>
|
|
49
|
+
{#if password_error}
|
|
50
|
+
<li class="error {error_class}">
|
|
51
|
+
{password_error}
|
|
52
|
+
</li>
|
|
53
|
+
{/if}
|
|
54
|
+
{#if password_error_confirmation}
|
|
55
|
+
<li class="error {error_class}">
|
|
56
|
+
{password_error_confirmation}
|
|
57
|
+
</li>
|
|
58
|
+
{/if}
|
|
59
|
+
</ul>
|
|
60
|
+
{/if}
|
|
61
|
+
<fieldset>
|
|
62
|
+
<label class="field">
|
|
63
|
+
<div class={label_class}>Password</div>
|
|
64
|
+
<input
|
|
65
|
+
bind:this={password_input}
|
|
66
|
+
placeholder="**********"
|
|
67
|
+
required="required"
|
|
68
|
+
class={input_class}
|
|
69
|
+
class:invalid={password_error}
|
|
70
|
+
id="password-change_password"
|
|
71
|
+
type="password"
|
|
72
|
+
name="password"/>
|
|
73
|
+
</label>
|
|
74
|
+
<label class="field">
|
|
75
|
+
<div class={label_class}>Confirm Password</div>
|
|
76
|
+
<input
|
|
77
|
+
bind:this={password_confirmation_input}
|
|
78
|
+
type="password"
|
|
79
|
+
id="password_confirmation-change_password"
|
|
80
|
+
name="password_confirmation"
|
|
81
|
+
class={input_class}
|
|
82
|
+
class:invalid={password_error_confirmation}
|
|
83
|
+
required="required"
|
|
84
|
+
placeholder="**********"
|
|
85
|
+
/>
|
|
86
|
+
</label>
|
|
87
|
+
</fieldset>
|
|
88
|
+
<footer>
|
|
89
|
+
<input type="submit" value="Change Password" class="button {button_class}"/>
|
|
90
|
+
</footer>
|
|
91
|
+
</form>
|
|
92
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CloseDialogHandle } from '@ctx-core/dialog'
|
|
3
|
+
import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
|
|
4
|
+
import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
|
|
5
|
+
import { Auth0_c } from './Auth0_c.js'
|
|
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>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts">
|
|
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'
|
|
4
|
+
import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
|
|
5
|
+
import { Auth0_c } from './Auth0_c.js'
|
|
6
|
+
import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
|
|
7
|
+
export let error_class = '', input_class = '', button_class = '', label_class = '.js'
|
|
8
|
+
const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
|
|
9
|
+
const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
|
|
10
|
+
const auth0_token_error$ = auth0_token_error$_b(ctx)
|
|
11
|
+
const open_auth0_login = open_auth0_login_b(ctx)
|
|
12
|
+
const open_auth0_signup = open_auth0_signup_b(ctx)
|
|
13
|
+
const _ = new Auth0_c(ctx)
|
|
14
|
+
let email_input:HTMLInputElement, error:string
|
|
15
|
+
$: error = $auth0_token_error$?.error
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="form forgot_password">
|
|
19
|
+
<Auth0_Dialog_Close></Auth0_Dialog_Close>
|
|
20
|
+
<h1>Forgot Password</h1>
|
|
21
|
+
<form
|
|
22
|
+
action="https://{$AUTH0_DOMAIN$}/passwordless/start"
|
|
23
|
+
accept-charset="UTF-8"
|
|
24
|
+
method="post"
|
|
25
|
+
on:submit={event => _.onsubmit_forgot_password(event, { email_input })}
|
|
26
|
+
>
|
|
27
|
+
{#if $auth0_token_error$}
|
|
28
|
+
<ul>
|
|
29
|
+
<li class="error {error_class}">
|
|
30
|
+
{$auth0_token_error$.error}: {$auth0_token_error$.error_description}
|
|
31
|
+
</li>
|
|
32
|
+
</ul>
|
|
33
|
+
{/if}
|
|
34
|
+
<fieldset>
|
|
35
|
+
<label class="field">
|
|
36
|
+
<div class={label_class}>Email</div>
|
|
37
|
+
<input
|
|
38
|
+
bind:this={email_input}
|
|
39
|
+
placeholder="your@email.com"
|
|
40
|
+
required="required"
|
|
41
|
+
class="form-control {input_class}"
|
|
42
|
+
class:invalid={error}
|
|
43
|
+
type="email"
|
|
44
|
+
id="email-forgot_password"
|
|
45
|
+
name="email"/>
|
|
46
|
+
</label>
|
|
47
|
+
</fieldset>
|
|
48
|
+
<footer>
|
|
49
|
+
<input
|
|
50
|
+
type="submit"
|
|
51
|
+
value="Reset Password"
|
|
52
|
+
class="button {button_class}"
|
|
53
|
+
/>
|
|
54
|
+
<label
|
|
55
|
+
class="navigation__auth {label_class}"
|
|
56
|
+
on:click={open_auth0_login}
|
|
57
|
+
>Have an account? Log in…</label>
|
|
58
|
+
<label
|
|
59
|
+
class="navigation__auth {label_class}"
|
|
60
|
+
on:click={open_auth0_signup}
|
|
61
|
+
>Don't have an account? Signup…</label>
|
|
62
|
+
</footer>
|
|
63
|
+
</form>
|
|
64
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
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'
|
|
4
|
+
import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
|
|
5
|
+
const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
|
|
6
|
+
const is_auth0_loggedin$ = is_auth0_loggedin$_b(ctx)
|
|
7
|
+
const is_auth0_loggedout$ = is_auth0_loggedout$_b(ctx)
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
{#if $is_auth0_loggedin$}
|
|
11
|
+
<slot name="loggedin"><slot></slot></slot>
|
|
12
|
+
{:else if $is_auth0_loggedout$}
|
|
13
|
+
<slot name="loggedout"></slot>
|
|
14
|
+
{/if}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
AUTH0_DOMAIN$_b, auth0_token_error$_b, auth0_token_error_txt$_b, open_auth0_forgot_password_b, open_auth0_signup_b
|
|
4
|
+
} from '@ctx-core/auth0'
|
|
5
|
+
import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
|
|
6
|
+
import { Auth0_c } from './Auth0_c.js'
|
|
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)
|
|
11
|
+
const AUTH0_DOMAIN = AUTH0_DOMAIN$_b(ctx)
|
|
12
|
+
const open_auth0_signup = open_auth0_signup_b(ctx)
|
|
13
|
+
const open_auth0_forgot_password = open_auth0_forgot_password_b(ctx)
|
|
14
|
+
const _ = new Auth0_c(ctx)
|
|
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
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div bind:this={root} class="form {$$props.class||''}">
|
|
24
|
+
<Auth0_Dialog_Close></Auth0_Dialog_Close>
|
|
25
|
+
<h1><slot name="login_text">Welcome</slot></h1>
|
|
26
|
+
<form
|
|
27
|
+
action="https://{$AUTH0_DOMAIN}/oauth/token"
|
|
28
|
+
accept-charset="UTF-8"
|
|
29
|
+
method="post"
|
|
30
|
+
on:submit={event =>
|
|
31
|
+
_.onsubmit_login(event, {
|
|
32
|
+
username_login_input,
|
|
33
|
+
password_login_input
|
|
34
|
+
}, ()=>_.schedule_forms_clear(root))}
|
|
35
|
+
>
|
|
36
|
+
{#if $auth0_token_error_txt$}
|
|
37
|
+
<ul>
|
|
38
|
+
<li class="error {error_class}">
|
|
39
|
+
{$auth0_token_error_txt$}
|
|
40
|
+
</li>
|
|
41
|
+
</ul>
|
|
42
|
+
{/if}
|
|
43
|
+
<fieldset>
|
|
44
|
+
<label class="field">
|
|
45
|
+
<div class={label_class}>Email</div>
|
|
46
|
+
<input
|
|
47
|
+
bind:this={username_login_input}
|
|
48
|
+
placeholder="your@email.com"
|
|
49
|
+
required="required"
|
|
50
|
+
class="form-control {input_class}"
|
|
51
|
+
class:invalid={error_username}
|
|
52
|
+
type="email"
|
|
53
|
+
id="username-login"
|
|
54
|
+
name="username"/>
|
|
55
|
+
</label>
|
|
56
|
+
<label class="field">
|
|
57
|
+
<div class={label_class}>Password</div>
|
|
58
|
+
<input
|
|
59
|
+
bind:this={password_login_input}
|
|
60
|
+
placeholder="**********"
|
|
61
|
+
required="required"
|
|
62
|
+
class={input_class}
|
|
63
|
+
class:invalid={error_password}
|
|
64
|
+
id="password-login"
|
|
65
|
+
type="password"
|
|
66
|
+
name="password"/>
|
|
67
|
+
</label>
|
|
68
|
+
</fieldset>
|
|
69
|
+
<footer>
|
|
70
|
+
<input
|
|
71
|
+
type="submit"
|
|
72
|
+
value="Login"
|
|
73
|
+
class="button {button_class}"
|
|
74
|
+
/>
|
|
75
|
+
<label
|
|
76
|
+
class="navigation__auth {label_class}"
|
|
77
|
+
on:click={open_auth0_signup}
|
|
78
|
+
>Don't have an account? Signup…</label>
|
|
79
|
+
<label
|
|
80
|
+
class="navigation__auth {label_class}"
|
|
81
|
+
on:click={open_auth0_forgot_password}
|
|
82
|
+
>Forgot Password?</label>
|
|
83
|
+
</footer>
|
|
84
|
+
</form>
|
|
85
|
+
</div>
|