File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,9 @@ const authSetup = function () {
8989 return ;
9090 } else if ( ! isLoggedIn ( ) && returnAppUrl ) {
9191 login ( ) ;
92+ } else if ( qs [ 'error' ] && qs [ 'state' ] ) {
93+ logger ( "Error in executing callback(): " , qs [ 'error_description' ] ) ;
94+ showLoginError ( qs [ 'error_description' ] , appUrl ) ;
9295 } else {
9396 logger ( "User already logged in" , true ) ;
9497 postLogin ( ) ;
@@ -455,6 +458,15 @@ const authSetup = function () {
455458 return hostname ;
456459 }
457460
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+
458470 // execute
459471 init ( ) ;
460472} ;
You can’t perform that action at this time.
0 commit comments