@@ -420,11 +420,13 @@ export class AuthingSSO {
420420 . nonce ( Math . random ( ) . toString ( ) )
421421 . extIdpConnId ( ext_idp_conn_id )
422422 . build ( ) ;
423- if ( isInElectron ) {
424- window . open ( url . href ) ;
425- } else {
426- window . location . href = url . href ;
427- }
423+
424+ console . log ( url . href , 'url.hrefurl.hrefurl.href deugger' )
425+ // if (isInElectron) {
426+ // window.open(url.href);
427+ // } else {
428+ // window.location.href = url.href;
429+ // }
428430 }
429431
430432 /**
@@ -511,7 +513,7 @@ export class AuthingSSO {
511513 timeoutId = setTimeout ( ( ) => {
512514 cleanup ( ) ;
513515 reject ( { error : "timeout" } ) ;
514- } , 5000 ) ; // 5 秒超时
516+ } , 2800 ) ; // 2.8 秒超时
515517
516518 window . addEventListener ( "message" , messageHandler ) ;
517519 } ) ;
@@ -530,7 +532,8 @@ export class AuthingSSO {
530532 // 如果传入的 ext_idp_conn_id 存在,优先使用
531533 if ( ! params ?. ext_idp_conn_id ) {
532534 // 调用接口获取 ext_idp_conn_id
533- const domain = params ?. referrer || referrerReferrer || "https://lifelong.smartedu.cn/" ;
535+ const domain = referrerReferrer || "lifelong.smartedu.cn" ;
536+ // const domain = "lifelong.smartedu.cn";
534537 const matchConnRes : any = await this . _axios . get ( MATCH_CONN , {
535538 params : {
536539 app_id : this . appId ,
@@ -553,11 +556,10 @@ export class AuthingSSO {
553556
554557
555558 // 如果传入的 ext_idp_conn_id 存在,优先使用
556-
557559 if ( params ?. referrer ) {
558560 console . log ( params ?. referrer , referrerReferrer , 'referrerparams debugger' )
559561 if ( params ?. referrer !== referrerReferrer ) {
560- // return null
562+ return null
561563 }
562564 }
563565
@@ -582,7 +584,7 @@ export class AuthingSSO {
582584 } catch ( e ) {
583585 // iframe 登录异常,fallback 到跳转登录
584586 console . log ( e , 'eeeeeeee debugger' )
585- // this.loginEtextbookpro(ext_idp_conn_id);
587+ this . loginEtextbookpro ( ext_idp_conn_id ) ;
586588 }
587589 }
588590}
0 commit comments