Commit 341183a 1 parent b66fc04 commit 341183a Copy full SHA for 341183a
File tree 1 file changed +16
-15
lines changed
src/main/webapp/scripts/externalTinymcePlugins/googledrive
1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,23 @@ async function insertFromGoogleDrive() {
11
11
if ( ! gdClientId || ! gdScope ) {
12
12
apprise ( "Missing required system properties for google drive "
13
13
+ "integration. Please speak to your rspace administrator" ) ;
14
- }
15
- await gapi . load ( 'client:picker' ) ;
16
-
17
- const client = await google . accounts . oauth2 . initTokenClient ( {
18
- client_id : gdClientId ,
19
- scope : gdScope ,
20
- callback : onTokenResponse ,
21
- error_callback : onTokenResponseError ,
22
- } ) ;
23
-
24
- if ( ! accessToken ) {
25
- // show consent screen for user login and authorisation
26
- client . requestAccessToken ( { prompt : 'consent' } ) ;
27
14
} else {
28
- // skip consent screen when user has already consented and has a token
29
- client . requestAccessToken ( { prompt : '' } ) ;
15
+ await gapi . load ( 'client:picker' ) ;
16
+
17
+ const client = await google . accounts . oauth2 . initTokenClient ( {
18
+ client_id : gdClientId ,
19
+ scope : gdScope ,
20
+ callback : onTokenResponse ,
21
+ error_callback : onTokenResponseError ,
22
+ } ) ;
23
+
24
+ if ( ! accessToken ) {
25
+ // show consent screen for user login and authorisation
26
+ client . requestAccessToken ( { prompt : 'consent' } ) ;
27
+ } else {
28
+ // skip consent screen when user has already consented and has a token
29
+ client . requestAccessToken ( { prompt : '' } ) ;
30
+ }
30
31
}
31
32
}
32
33
You can’t perform that action at this time.
0 commit comments