@ctx-core/auth0-ui 12.2.230 → 12.2.232
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/CHANGELOG.md +16 -0
- package/lib/ui/Auth0_c.js +2 -2
- package/lib/ui/Auth0_c.js.map +1 -1
- package/package.json +3 -3
- package/src/ui/Auth0_c.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ctx-core/auth0-ui
|
|
2
2
|
|
|
3
|
+
## 12.2.232
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @ctx-core/auth0: ^35.1.2 -> ^35.1.3
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @ctx-core/auth0-management@9.1.3
|
|
10
|
+
|
|
11
|
+
## 12.2.231
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- @ctx-core/auth0: ^35.1.1 -> ^35.1.2
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @ctx-core/auth0-management@9.1.2
|
|
18
|
+
|
|
3
19
|
## 12.2.230
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/lib/ui/Auth0_c.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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_,
|
|
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_get, auth0__passwordless_start__fetch_get, auth0__change_password__validate, auth0__forgot_password__validate, auth0__signup__validate } from '@ctx-core/auth0';
|
|
2
2
|
import { dom_a_, has_dom } from '@ctx-core/dom';
|
|
3
3
|
import { noop } from '@ctx-core/function';
|
|
4
4
|
import { onDestroy } from 'svelte';
|
|
@@ -55,7 +55,7 @@ export class Auth0_c {
|
|
|
55
55
|
const { password } = form;
|
|
56
56
|
let error;
|
|
57
57
|
try {
|
|
58
|
-
const [response_json, response] = await
|
|
58
|
+
const [response_json, response] = await auth0__change_password__fetch_post(this.ctx, password);
|
|
59
59
|
if (!response.ok) {
|
|
60
60
|
if (response.status == 401) {
|
|
61
61
|
auth0__login__open(this.ctx);
|
package/lib/ui/Auth0_c.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,\n\tauth0__dbconnections_signup__fetch_get,\n\tauth0__oauth_token__fetch_get,\n\tauth0__passwordless_start__fetch_get,\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 login_auth0_body_ = (data:any)=>\n\t\tauth0__body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx, data\n\t\t)\n\treadonly login_password_realm_body_ = (data:any)=>\n\t\tpassword_realm__body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx,\n\t\t\tthis.login_auth0_body_(data)\n\t\t)\n\treadonly signup_auth0_body_ = (data:any)=>\n\t\tauth0__body_<signup_data_password_realm_body_I>(this.ctx, data) as signup_data_password_realm_body_I\n\treadonly signup_password_realm_body_ = (data:any)=>\n\t\tpassword_realm__body_<signup_data_password_realm_body_I>(this.ctx, this.signup_auth0_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.schedule_forms_clear(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:auth0__login_data_T, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_token, response] = await auth0__oauth_token__fetch_get(\n\t\t\tthis.ctx, this.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\tschedule_forms_clear()\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, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_userinfo] = await auth0__dbconnections_signup__fetch_get(\n\t\t\tthis.ctx,\n\t\t\tthis.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\tschedule_forms_clear()\n\t\tawait this.login({\n\t\t\tusername: data.email,\n\t\t\tpassword: data.password,\n\t\t}, schedule_forms_clear)\n\t}\n\treadonly change_password = async (form:{ password:string }, schedule_forms_clear = ()=>{})=>{\n\t\tconst { password } = form\n\t\tlet error\n\t\ttry {\n\t\t\tconst [response_json, response] = await auth0__change_password__fetch(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\tschedule_forms_clear()\n\t\tthis.auth0__close()\n\t}\n\treadonly schedule_forms_clear_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.schedule_forms_clear(root)\n\t}\n\treadonly schedule_forms_clear = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tauth0__token__error__clear(this.ctx)\n\t\t\tclear_inputs(dom_a_('input[type=text]', root))\n\t\t\tclear_inputs(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly onsubmit_signup = async (event:Event, ctx:onsubmit_signup_Ctx, schedule_forms_clear = ()=>{})=>{\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}, schedule_forms_clear)\n\t\treturn\n\t}\n\treadonly onsubmit_login = async (event:Event, ctx:onsubmit_login_Ctx, schedule_forms_clear = ()=>{})=>{\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 }, schedule_forms_clear)\n\t}\n\treadonly onsubmit_forgot_password = async (event:Event, ctx:onsubmit_forgot_password_Ctx)=>{\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_get(\n\t\t\tthis.ctx, this.login_auth0_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 onsubmit_change_password = async (\n\t\tevent:Event, ctx:onsubmit_change_password_Ctx, schedule_forms_clear = 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 }, schedule_forms_clear)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.auth0__close()\n\t}\n}\nfunction clear_inputs(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_data_password_realm_body_I\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_data_password_realm_body_I\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 onsubmit_change_password_Ctx {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface onsubmit_forgot_password_Ctx {\n\temail_input:HTMLInputElement\n}\nexport interface onsubmit_login_Ctx {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface onsubmit_signup_Ctx {\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","auth0__dbconnections_signup__fetch_get","auth0__oauth_token__fetch_get","auth0__passwordless_start__fetch_get","auth0__change_password__validate","auth0__forgot_password__validate","auth0__signup__validate","dom_a_","has_dom","noop","onDestroy","Auth0_c","constructor","ctx","login_auth0_body_","data","login_password_realm_body_","signup_auth0_body_","signup_password_realm_body_","auth0_opened_class","auth0_token_json_","auth0_token_error_","onMount","root","unsubscribe","subscribe","schedule_forms_clear","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","schedule_forms_clear_","setTimeout","clear_inputs","onsubmit_signup","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","onsubmit_login","username_login_input","password_login_input","onsubmit_forgot_password","connection","send","onsubmit_change_password","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,6BAA6B,EAC7BC,sCAAsC,EACtCC,6BAA6B,EAC7BC,oCAAoC,EACpCC,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,oBAAoB,CAACC,OAC7BzB,aACC,IAAI,CAACuB,GAAG,EAAEE;aAEHC,6BAA6B,CAACD,OACtChB,sBACC,IAAI,CAACc,GAAG,EACR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CAAC;YACD,MAAMxC,qCACL,IAAI,CAACU,GAAG,EAAE,IAAI,CAACC,iBAAiB,CAACC;YAElClB,0CAA0C,IAAI,CAACgB,GAAG;QACnD;aACS2D,2BAA2B,OACnCb,OAAa9C,KAAkCa,uBAAuBjB,IAAI,GACxE;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,aAAaiB,MAAe,EAAE;IACtC,IAAK,IAAIC,IAAI,GAAGA,IAAID,OAAOE,MAAM,EAAED,IAAK;QACvC,MAAME,QAAQH,MAAM,CAACC,EAAE;QACvBE,MAAMb,KAAK,GAAG;IACf;AACD"}
|
|
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_get,\n\tauth0__passwordless_start__fetch_get,\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 login_auth0_body_ = (data:any)=>\n\t\tauth0__body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx, data\n\t\t)\n\treadonly login_password_realm_body_ = (data:any)=>\n\t\tpassword_realm__body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx,\n\t\t\tthis.login_auth0_body_(data)\n\t\t)\n\treadonly signup_auth0_body_ = (data:any)=>\n\t\tauth0__body_<signup_data_password_realm_body_I>(this.ctx, data) as signup_data_password_realm_body_I\n\treadonly signup_password_realm_body_ = (data:any)=>\n\t\tpassword_realm__body_<signup_data_password_realm_body_I>(this.ctx, this.signup_auth0_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.schedule_forms_clear(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:auth0__login_data_T, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_token, response] = await auth0__oauth_token__fetch_get(\n\t\t\tthis.ctx, this.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\tschedule_forms_clear()\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, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_userinfo] = await auth0__dbconnections_signup__fetch_get(\n\t\t\tthis.ctx,\n\t\t\tthis.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\tschedule_forms_clear()\n\t\tawait this.login({\n\t\t\tusername: data.email,\n\t\t\tpassword: data.password,\n\t\t}, schedule_forms_clear)\n\t}\n\treadonly change_password = async (form:{ password:string }, schedule_forms_clear = ()=>{})=>{\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\tschedule_forms_clear()\n\t\tthis.auth0__close()\n\t}\n\treadonly schedule_forms_clear_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.schedule_forms_clear(root)\n\t}\n\treadonly schedule_forms_clear = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tauth0__token__error__clear(this.ctx)\n\t\t\tclear_inputs(dom_a_('input[type=text]', root))\n\t\t\tclear_inputs(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly onsubmit_signup = async (event:Event, ctx:onsubmit_signup_Ctx, schedule_forms_clear = ()=>{})=>{\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}, schedule_forms_clear)\n\t\treturn\n\t}\n\treadonly onsubmit_login = async (event:Event, ctx:onsubmit_login_Ctx, schedule_forms_clear = ()=>{})=>{\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 }, schedule_forms_clear)\n\t}\n\treadonly onsubmit_forgot_password = async (event:Event, ctx:onsubmit_forgot_password_Ctx)=>{\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_get(\n\t\t\tthis.ctx, this.login_auth0_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 onsubmit_change_password = async (\n\t\tevent:Event, ctx:onsubmit_change_password_Ctx, schedule_forms_clear = 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 }, schedule_forms_clear)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.auth0__close()\n\t}\n}\nfunction clear_inputs(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_data_password_realm_body_I\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_data_password_realm_body_I\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 onsubmit_change_password_Ctx {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface onsubmit_forgot_password_Ctx {\n\temail_input:HTMLInputElement\n}\nexport interface onsubmit_login_Ctx {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface onsubmit_signup_Ctx {\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_get","auth0__passwordless_start__fetch_get","auth0__change_password__validate","auth0__forgot_password__validate","auth0__signup__validate","dom_a_","has_dom","noop","onDestroy","Auth0_c","constructor","ctx","login_auth0_body_","data","login_password_realm_body_","signup_auth0_body_","signup_password_realm_body_","auth0_opened_class","auth0_token_json_","auth0_token_error_","onMount","root","unsubscribe","subscribe","schedule_forms_clear","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","schedule_forms_clear_","setTimeout","clear_inputs","onsubmit_signup","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","onsubmit_login","username_login_input","password_login_input","onsubmit_forgot_password","connection","send","onsubmit_change_password","onclose","inputs","i","length","input"],"mappings":"AAUA,SACCA,YAAY,EACZC,sBAAsB,EACtBC,qBAAqB,EACrBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,YAAY,EACZC,2BAA2B,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C,EAAE;QACvBE,MAAMb,KAAK,GAAG;IACf;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/auth0-ui",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.232",
|
|
4
4
|
"description": "ctx-core auth0 ui component & express endpoints",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"./package.json": "./package.json"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ctx-core/auth0": "^35.1.
|
|
28
|
-
"@ctx-core/auth0-management": "^9.1.
|
|
27
|
+
"@ctx-core/auth0": "^35.1.3",
|
|
28
|
+
"@ctx-core/auth0-management": "^9.1.3",
|
|
29
29
|
"@ctx-core/dialog": "^20.1.35",
|
|
30
30
|
"@ctx-core/dialog-ui-svelte": "^1.0.46",
|
|
31
31
|
"@ctx-core/dom": "^11.2.33",
|
package/src/ui/Auth0_c.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
auth0__forgot_password__check_email__open,
|
|
20
20
|
auth0__login__open,
|
|
21
21
|
password_realm__body_,
|
|
22
|
-
|
|
22
|
+
auth0__change_password__fetch_post,
|
|
23
23
|
auth0__dbconnections_signup__fetch_get,
|
|
24
24
|
auth0__oauth_token__fetch_get,
|
|
25
25
|
auth0__passwordless_start__fetch_get,
|
|
@@ -102,7 +102,7 @@ export class Auth0_c {
|
|
|
102
102
|
const { password } = form
|
|
103
103
|
let error
|
|
104
104
|
try {
|
|
105
|
-
const [response_json, response] = await
|
|
105
|
+
const [response_json, response] = await auth0__change_password__fetch_post(this.ctx, password)
|
|
106
106
|
if (!response.ok) {
|
|
107
107
|
if (response.status == 401) {
|
|
108
108
|
auth0__login__open(this.ctx)
|