@authing/guard-shim-react 4.5.36 → 4.5.37
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/dist/guard.min.js +9 -9
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +2 -2
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +2 -2
- package/dist/typings/src/_utils/config/index.d.ts +1 -1
- package/dist/typings/src/_utils/context.d.ts +1 -1
- package/package.json +1 -1
package/dist/guard.min.js
CHANGED
|
@@ -27477,7 +27477,7 @@ var zD=i(4232),$D=i(4631),HD=i(1062),WD=i(8787),GD={zhCN:zD/* default */.Z,enUS:
|
|
|
27477
27477
|
* 多账号 状态
|
|
27478
27478
|
*/
|
|
27479
27479
|
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0,isSpecialBrowser:!1},tL=y().createContext(eL),nL=y().createContext({spin:!1,spinChange:function(){}}),rL=function(){return QD(nL)},oL=function(){return QD(tL).publicConfig},iL=function(){return QD(tL).httpClient},aL=function(){return QD(tL).isSpecialBrowser},sL=function(){return QD(tL).appId},cL=function(){return QD(tL).tenantId};function lL(){return QD(tL).initData}var uL=function(){return QD(tL).currentModule},dL=function(){return QD(tL).events},fL=function(){var e=QD(tL);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},pL=function(){return QD(tL).finallyConfig},hL=function(){return QD(tL).isAuthFlow},mL=function(){return QD(tL).multipleInstance},vL=function(){return QD(tL).phoneRegex},gL=function(){return QD(tL).defaultLanguageConfig},yL=function(){var e=oL(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},bL=function(e){var t,n,r=oL(),o=r.loginSmsConfig,i=r.registerSmsConfig,a=!1;switch(e){case"login":a="ON"===(null===(t=null==o?void 0:o.robot)||void 0===t?void 0:t.switch);break;case"register":a="ON"===(null===(n=null==i?void 0:i.robot)||void 0===n?void 0:n.switch)}return a},wL=y().useMemo,CL={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},EL=function(e){var t=e.langRange,n=void 0===t?["zh-CN","zh-TW","en-US","ja-JP"]:t,r=e.onLangChange,o=Pu().i18n,i=QD(tL).guardPageConfig,a=pL(),s=wL((function(){return"g2-change-language-text ".concat(a.mode)}),[a]),c=wL((function(){var e;return null===(e=i.global)||void 0===e?void 0:e.showChangeLanguage}),[i]),l=wL((function(){return Object.keys(CL).includes(o.resolvedLanguage)?o.resolvedLanguage:dd(o.resolvedLanguage)[0]||"en-US"}),[o.resolvedLanguage]),u=wL((function(){return y().createElement(y().Fragment,null,y().createElement("span",null,CL[l].label))}),[l]),d=wL((function(){return Object.keys(CL).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:CL[e].label}}))}),[n]);if(!c||0===n.length)return null;var f={items:d,onClick:function(e){l!==e.key&&(o.changeLanguage(e.key),null==r||r(e.key))}};return y().createElement("div",{className:"g2-change-language-container"},y().createElement(wP,{menu:f,trigger:["click"],placement:"bottom",overlayClassName:"authing-g2-change-language-menu"},y().createElement("span",{className:s},u,y().createElement(YD,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))};// CONCATENATED MODULE: ./package.json
|
|
27480
|
-
const kL="4.5.
|
|
27480
|
+
const kL="4.5.37";// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
27481
27481
|
function SL(){return kL}// CONCATENATED MODULE: ./src/_utils/flowHandleStorage.ts
|
|
27482
27482
|
var xL,_L=function(){return xL},PL=function(e){xL=e},TL=function(){return TL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},TL.apply(this,arguments)},OL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},NL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},IL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},AL=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},RL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return OL(void 0,void 0,void 0,(function(){return NL(this,(function(t){switch(t.label){case 0:return[4/*yield*/,fetch.apply(void 0,AL([],IL(e),!1))];case 1:return[2/*return*/,t.sent().json()]}}))}))},ML=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};RL.get=function(e,t,n){return void 0===t&&(t={}),OL(void 0,void 0,void 0,(function(){var r,o,i,a,s;return NL(this,(function(c){switch(c.label){case 0:r=TL(TL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[RL.langHeader]=bX(),s)),""!==RL.tenantId&&(r[RL.tenantHeader]=RL.tenantId),c.label=1;case 1:return c.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([ML(i.cancel),ma()("".concat(RL.baseUrl).concat(e).concat(jc().stringify(t,{addQueryPrefix:!0})),TL(TL({method:"GET"},n),{withCredentials:!0,headers:r,cancelToken:i.token}))])];case 2:return[2/*return*/,null==(a=c.sent())?void 0:a.data];case 3:return c.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},RL.post=function(e,t,n){return OL(void 0,void 0,void 0,(function(){var r,o,i,a,s,c;return NL(this,(function(l){switch(l.label){case 0:r=TL(TL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[RL.langHeader]=cu.resolvedLanguage,s)),""!==RL.tenantId&&(r[RL.tenantHeader]=RL.tenantId),l.label=1;case 1:return l.trys.push([1,3,,4]),o=ma().CancelToken,i=o.source(),[4/*yield*/,Promise.race([ML(i.cancel),ma()("".concat(RL.baseUrl).concat(e),{data:t,method:"POST",withCredentials:!0,cancelToken:i.token,headers:TL(TL({"Content-Type":"application/json"},null==n?void 0:n.headers),(c={},c[RL.langHeader]=bX(),c))})])];case 2:return[2/*return*/,null==(a=l.sent())?void 0:a.data];case 3:return l.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},RL.postForm=function(e,t,n){return OL(void 0,void 0,void 0,(function(){var r,o,i,a;return NL(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),r=ma().CancelToken,o=r.source(),[4/*yield*/,Promise.race([ML(o.cancel),ma()("".concat(RL.baseUrl).concat(e),{method:"POST",data:t,withCredentials:!0,cancelToken:o.token,headers:TL(TL({},null==n?void 0:n.headers),(a={},a[RL.langHeader]=bX(),a))})])];case 1:return[2/*return*/,null==(i=s.sent())?void 0:i.data];case 2:return s.sent(),[2/*return*/,Promise.resolve({code:-2})];case 3:return[2/*return*/]}}))}))},RL.baseUrl="",RL.setBaseUrl=function(e){RL.baseUrl=e.replace(/\/$/,"")};var DL,LL="x-authing-lang";RL.langHeader=LL,RL.tenantHeader="x-authing-app-tenant-idåå",RL.tenantId="",RL.setLangHeader=function(e){RL.langHeader=e||LL},RL.setTenantHeader=function(e){RL.tenantHeader=e||LL},RL.setTenantId=function(e){RL.tenantId=e},function(e){e.ERROR="error",e.LOGIN="login",e.REGISTER="register",e.MFA="mfa",e.FORGET_PWD="forgetPassword",e.FORCED_PASSWORD_RESET="forcedPasswordReset",e.NOTICE_PASSWORD_RESET="noticePasswordReset",e.FIRST_LOGIN_PASSWORD="firstLoginPassword",e.UNSAFE_PASSWORD_RESET="unsafePasswordReset",e.DOWNLOAD_AT="downloadAT",e.BIND_TOTP="bindTotp",e.ANY_QUESTIONS="anyQuestions",e.LOGIN_COMPLETE_INFO="loginCompleteInfo",e.REGISTER_PASSWORD="registerPassword",e.REGISTER_COMPLETE_INFO="registerCompleteInfo",e.RECOVERY_CODE="recoveryCode",e.SUBMIT_SUCCESS="submitSuccess",e.IDENTITY_BINDING_ASK="identityBindingAsk",e.IDENTITY_BINDING="identityBinding",e.IDENTITY_BINDING_NO_ASK="identityBindingNoAsk",e.SELF_UNLOCK="selfUnlock",e.FLOW_SELECT_ACCOUNT="flowSelectAccount",
|
|
27483
27483
|
/** 多租户门户选择页 */
|
|
@@ -28074,9 +28074,7 @@ var e=Dz([],Mz(l),!1);return N("login.inputAccount",{text:EX(e,ue,L)})}
|
|
|
28074
28074
|
// 登录注册分页
|
|
28075
28075
|
return N("login.inputAccount",{text:EX(Dz([],Mz(l),!1),ue,L)})}),[null==D?void 0:D.autoRegister,I,ue,L,l,N]);return y().createElement("div",{className:"authing-g2-login-password"},y().createElement(sT,{name:"passworLogin",onFinish:function(t){return Az(void 0,void 0,void 0,(function(){var o,i,a,s,c,l,u,f,v;return Rz(this,(function(g){switch(g.label){case 0:return T(!0),(null==r?void 0:r.length)&&!E?(j.current.onError(),[2/*return*/]):(G(0),J(!1),
|
|
28076
28076
|
// onBeforeLogin
|
|
28077
|
-
null===(l=null==j?void 0:j.current)||void 0===l||l.onSpin(!0),o={type:zs.Password,data:{identity:t.account,password:t.password,captchaCode:t.captchaCode}},[4/*yield*/,null===(u=e.onBeforeLogin)||void 0===u?void 0:u.call(e,o)]);case 1:
|
|
28078
|
-
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
28079
|
-
z&&$(Nz(e.host)),re?[4/*yield*/,se({account:t.account})]:[3/*break*/,3]);case 2:return i=g.sent(),a=i.code,s=i.data,null===(v=null==j?void 0:j.current)||void 0===v||v.onSpin(!1),200===a&&s.matched?
|
|
28077
|
+
null===(l=null==j?void 0:j.current)||void 0===l||l.onSpin(!0),o={type:zs.Password,data:{identity:t.account,password:t.password,captchaCode:t.captchaCode}},[4/*yield*/,null===(u=e.onBeforeLogin)||void 0===u?void 0:u.call(e,o)]);case 1:if(!g.sent()&&e.onBeforeLogin)return null===(f=null==j?void 0:j.current)||void 0===f||f.onSpin(!1),[2/*return*/];g.label=2;case 2:return g.trys.push([2,7,8,9]),re?[4/*yield*/,se({account:t.account})]:[3/*break*/,4];case 3:return i=g.sent(),a=i.code,s=i.data,null===(v=null==j?void 0:j.current)||void 0===v||v.onSpin(!1),200===a&&s.matched?
|
|
28080
28078
|
// gene idp init url
|
|
28081
28079
|
function(e){var t,r,o=Iz({from_guard:"1",app_id:d,guard_version:"Guard@".concat(h)},p&&{tenant_id:p});if(null==D?void 0:D.isHost){if(delete o.from_guard,o.from_hosted_guard="1",m){o.redirected="1";var i=PX();i&&(
|
|
28082
28080
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
@@ -28084,7 +28082,9 @@ o.redirect_url=null===(t=jc().parse(i.location.search))||void 0===t?void 0:t.fin
|
|
|
28084
28082
|
// 托管登录页,直接写死登录 URL
|
|
28085
28083
|
o.identifier=e.identifier;var a=oF[e.protocol];if(!a)return null;r="".concat(n).concat(a,"?").concat(jc().stringify(o))}else{var s=iF[e.protocol];if(!s)return null;
|
|
28086
28084
|
// 嵌入式组件,从配置字段获取登录 URL
|
|
28087
|
-
r=e.config[s]}o.redirected?window.location.replace(r):zQ(r)}(s.identityProvider):ne("fail"),[3/*break*/,
|
|
28085
|
+
r=e.config[s]}o.redirected?window.location.replace(r):zQ(r)}(s.identityProvider):ne("fail"),[3/*break*/,6];case 4:return[4/*yield*/,ae(o)];case 5:c=g.sent(),ce(c,t.account),g.label=6;case 6:return[3/*break*/,9];case 7:throw g.sent();case 8:
|
|
28086
|
+
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
28087
|
+
return z&&$(Nz(e.host)),[7/*endfinally*/];case 9:return[2/*return*/]}}))}))},onFinishFailed:function(){return j.current.onError()},autoComplete:"off",form:f,onValuesChange:function(e){(null==e?void 0:e.account)&&a&&a(zs.Password,null==e?void 0:e.account)}},y().createElement(az,{name:"account",className:"authing-g2-input-form",validPasswordLoginMethods:(null===(t=null==M?void 0:M.passwordTabConfig)||void 0===t?void 0:t.validLoginMethods)||[],initialValue:w===zs.Password?b:""},y().createElement(uz,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!x,prefix:y().createElement(YD,{type:"authing-a-user-line1",style:{color:"#878A95"}}),
|
|
28088
28088
|
// onChange={e => {
|
|
28089
28089
|
// let v = e.target.value
|
|
28090
28090
|
// console.log(v, '22')
|
|
@@ -28111,16 +28111,16 @@ prefix:y().createElement(YD,{type:"authing-a-lock-line1",style:{color:"#878A95"}
|
|
|
28111
28111
|
// }
|
|
28112
28112
|
text:w("common.login"),className:"password",ref:C}))))},Kz=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Yz=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Jz=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Zz=y().useEffect,Qz=y().useRef,Xz=y().useState,e$=function(e){var t=e.agreements,n=e.onLoginFailed,r=e.onLoginSuccess,o=Jz(Xz(!1),2),i=o[0],a=o[1],s=Jz(Xz([]),2),c=s[0],l=s[1],u=Jz(Xz(!1),2),d=u[0],f=u[1],p=yL(),h=Jz(Xz("always_enable"===p),2),m=h[0],v=h[1],g=Jz(Xz(""),2),b=g[0],w=g[1],C=oL(),E=pL().host,k=sL(),S=iL().responseIntercept,x=Pu().t,_=hj().isPhoneMedia,P=YL(),T=Jz(sT.useForm(),1)[0],O=Qz(null);return Zz((function(){v("always_enable"===p),"always_enable"===p&&w(Nz(E))}),[p,E]),y().createElement("div",{className:"authing-g2-login-ad"},y().createElement(sT,{form:T,name:"adLogin",onFinish:function(o){return Kz(void 0,void 0,void 0,(function(){var a,s,l,u,d,p,h,m,g,y,_,T,N,I,A,R,M,D,L,F,j;return Yz(this,(function(B){switch(B.label){case 0:return f(!0),(null==t?void 0:t.length)&&!i?(null===(M=O.current)||void 0===M||M.onError(),[2/*return*/]):(
|
|
28113
28113
|
// onBeforeLogin
|
|
28114
|
-
null===(D=O.current)||void 0===D||D.onSpin(!0),a={type:Oi.AD,data:{identity:o.account,password:o.password,captchaCode:o.captchaCode}},[4/*yield*/,e.onBeforeLogin(a)]);case 1:return B.sent()?(s=o.account&&o.account.trim(),l=o.password,u=o.captchaCode,[4/*yield*/,(0,P.options.encryptFunction)(l,e.publicKey)]):(null===(L=O.current)||void 0===L||L.onSpin(!1),[2/*return*/]);case 2:d=B.sent(),
|
|
28115
|
-
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
28116
|
-
b&&w(Nz(E)),B.label=3;case 3:return B.trys.push([3,6,,7]),p="".concat(E,"/api/v2/ad/verify-user"),h=SL(),[4/*yield*/,fetch(p,{method:"POST",body:JSON.stringify({username:s,password:d,captchaCode:u,agreementIds:t.length?c:void 0}),credentials:"include",headers:(R={"Content-Type":"application/json"},R[RL.langHeader]=cu.resolvedLanguage,R["x-authing-userpool-id"]=C.userPoolId,R["x-authing-app-id"]=k,R["x-authing-sdk-version"]=h,R["x-authing-request-from"]="Guard@".concat(h),R)})];case 4:return[4/*yield*/,B.sent().json()];case 5:return m=B.sent(),g=S(m),y=g.code,_=g.apiCode,T=g.data,N=g.onGuardHandling,I=g.message,
|
|
28114
|
+
null===(D=O.current)||void 0===D||D.onSpin(!0),a={type:Oi.AD,data:{identity:o.account,password:o.password,captchaCode:o.captchaCode}},[4/*yield*/,e.onBeforeLogin(a)]);case 1:return B.sent()?(s=o.account&&o.account.trim(),l=o.password,u=o.captchaCode,[4/*yield*/,(0,P.options.encryptFunction)(l,e.publicKey)]):(null===(L=O.current)||void 0===L||L.onSpin(!1),[2/*return*/]);case 2:d=B.sent(),B.label=3;case 3:return B.trys.push([3,6,7,8]),p="".concat(E,"/api/v2/ad/verify-user"),h=SL(),[4/*yield*/,fetch(p,{method:"POST",body:JSON.stringify({username:s,password:d,captchaCode:u,agreementIds:t.length?c:void 0}),credentials:"include",headers:(R={"Content-Type":"application/json"},R[RL.langHeader]=cu.resolvedLanguage,R["x-authing-userpool-id"]=C.userPoolId,R["x-authing-app-id"]=k,R["x-authing-sdk-version"]=h,R["x-authing-request-from"]="Guard@".concat(h),R)})];case 4:return[4/*yield*/,B.sent().json()];case 5:return m=B.sent(),g=S(m),y=g.code,_=g.apiCode,T=g.data,N=g.onGuardHandling,I=g.message,
|
|
28117
28115
|
// // 更新本次登录方式
|
|
28118
28116
|
// data && multipleInstance && multipleInstance.setLoginWay('input', 'ad')
|
|
28119
28117
|
null===(F=O.current)||void 0===F||F.onSpin(!1),200===y?r(T):(
|
|
28120
28118
|
// 需要「图形验证码」并且是第一次,就发一次,后面存在的时候会在点击登录,表单校验通过后,不论对错都要重新请求验证码
|
|
28121
28119
|
_!==HF.INPUT_CAPTCHACODE||b||(w(Nz(E)),v(!0)),
|
|
28122
28120
|
// 向上层抛出错误
|
|
28123
|
-
(null==N?void 0:N())===vQ.RENDER_MESSAGE&&n(y,T,I)),[3/*break*/,
|
|
28121
|
+
(null==N?void 0:N())===vQ.RENDER_MESSAGE&&n(y,T,I)),[3/*break*/,8];case 6:return A=B.sent(),null===(j=O.current)||void 0===j||j.onSpin(!1),"ECONNABORTED"===A.code&&(vC.error(x("common.timeoutAD")),n(2333,{},JSON.stringify(A))),[3/*break*/,8];case 7:
|
|
28122
|
+
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
28123
|
+
return b&&w(Nz(E)),[7/*endfinally*/];case 8:return[2/*return*/]}}))}))},onFinishFailed:function(){return O.current.onError()},autoComplete:"off"},(null==C?void 0:C.ssoPageComponentDisplay.userPasswordInput)&&y().createElement(y().Fragment,null,y().createElement(sT.Item,{className:"authing-g2-input-form",name:"account",validateTrigger:["onBlur","onChange"],rules:QQ(x("common.account"))},y().createElement(rO,{autoFocus:!_,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:(null==C?void 0:C.mergeAdAndAccountPasswordLogin)?x("common.jobNumber"):x("login.inputAdUsername"),prefix:y().createElement(YD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(sT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:QQ(x("common.password"))},y().createElement(YB,{autoComplete:"off",className:"authing-g2-input",size:"large",placeholder:(null==C?void 0:C.mergeAdAndAccountPasswordLogin)?x("login.inputPwd"):x("login.inputAdPwd"),prefix:y().createElement(YD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),m&&y().createElement(sT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:QQ(x("common.captchaCode"))},y().createElement(pz,{className:"authing-g2-input",size:"large",placeholder:x("login.inputCaptchaCode"),verifyCodeUrl:b,changeCode:function(){return w(Nz(E))}})),Boolean(null==t?void 0:t.length)&&y().createElement(Cz,{onChange:function(e,t){a(e),l(t)},agreements:t,showError:d}),y().createElement(sT.Item,{className:"authing-g2-sumbit-form"},y().createElement(_j,{
|
|
28124
28124
|
// disabled={
|
|
28125
28125
|
// !!agreements.find(
|
|
28126
28126
|
// (item) => item.required && !acceptedAgreements
|
|
@@ -250,7 +250,7 @@ declare class MultipleAccount {
|
|
|
250
250
|
id: string;
|
|
251
251
|
loginAccount?: string | undefined;
|
|
252
252
|
usertype?: string | undefined;
|
|
253
|
-
}, "
|
|
253
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
254
254
|
setLoginWayByHttpData: (account: string, data: {
|
|
255
255
|
username?: string | undefined;
|
|
256
256
|
phone?: string | undefined;
|
|
@@ -294,7 +294,7 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
|
|
|
294
294
|
id: string;
|
|
295
295
|
loginAccount?: string | undefined;
|
|
296
296
|
usertype?: string | undefined;
|
|
297
|
-
}, "
|
|
297
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
298
298
|
setLoginWayByHttpData: (account: string, data: {
|
|
299
299
|
username?: string | undefined;
|
|
300
300
|
phone?: string | undefined;
|
|
@@ -39,7 +39,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
39
39
|
id: string;
|
|
40
40
|
loginAccount?: string | undefined;
|
|
41
41
|
usertype?: string | undefined;
|
|
42
|
-
}, "
|
|
42
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
43
43
|
setLoginWayByHttpData: (account: string, data: {
|
|
44
44
|
username?: string | undefined;
|
|
45
45
|
phone?: string | undefined;
|
|
@@ -61,7 +61,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
61
61
|
getOriginAccount: () => string;
|
|
62
62
|
getOriginWay: () => string;
|
|
63
63
|
} | undefined;
|
|
64
|
-
referMultipleState: ((type: "
|
|
64
|
+
referMultipleState: ((type: "multiple" | "login") => void) | undefined;
|
|
65
65
|
backfillData: BackFillMultipleState | undefined;
|
|
66
66
|
defaultQrWay: string | undefined;
|
|
67
67
|
};
|
|
@@ -53,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
53
53
|
loginMethods?: LoginMethods[] | undefined;
|
|
54
54
|
passwordLoginMethods?: string[] | undefined;
|
|
55
55
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
56
|
-
socialConnectionsBtnShape?: "button" | "
|
|
56
|
+
socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
|
|
57
57
|
enterpriseConnections?: string[] | undefined;
|
|
58
58
|
qrCodeScanOptions?: {
|
|
59
59
|
extIdpConnId?: string | undefined;
|
|
@@ -123,7 +123,7 @@ export declare const useGuardAccountSelectInstance: () => {
|
|
|
123
123
|
id: string;
|
|
124
124
|
loginAccount?: string | undefined;
|
|
125
125
|
usertype?: string | undefined;
|
|
126
|
-
}, "
|
|
126
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
127
127
|
setLoginWayByHttpData: (account: string, data: {
|
|
128
128
|
username?: string | undefined;
|
|
129
129
|
phone?: string | undefined;
|