File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,9 @@ const authSetup = function () {
89
89
return ;
90
90
} else if ( ! isLoggedIn ( ) && returnAppUrl ) {
91
91
login ( ) ;
92
+ } else if ( qs [ 'error' ] && qs [ 'state' ] ) {
93
+ logger ( "Error in executing callback(): " , qs [ 'error_description' ] ) ;
94
+ showLoginError ( qs [ 'error_description' ] , appUrl ) ;
92
95
} else {
93
96
logger ( "User already logged in" , true ) ;
94
97
postLogin ( ) ;
@@ -455,6 +458,15 @@ const authSetup = function () {
455
458
return hostname ;
456
459
}
457
460
461
+ function showLoginError ( message , linkUrl ) {
462
+ try {
463
+ document . getElementById ( "page-title-heading" ) . innerHTML = "Alert" ;
464
+ document . getElementById ( "loading_message_p" ) . innerHTML = message + " <a href=" + linkUrl + ">click here</a>" ;
465
+ } catch ( err ) {
466
+ logger ( "Error in changing loading message: " , err . message )
467
+ }
468
+ }
469
+
458
470
// execute
459
471
init ( ) ;
460
472
} ;
You can’t perform that action at this time.
0 commit comments