diff --git a/packages/bot-web-ui/src/stores/google-drive-store.js b/packages/bot-web-ui/src/stores/google-drive-store.js index abb175fb2d58..7aa371e7f7c1 100644 --- a/packages/bot-web-ui/src/stores/google-drive-store.js +++ b/packages/bot-web-ui/src/stores/google-drive-store.js @@ -51,9 +51,11 @@ export default class GoogleDriveStore { client_id: this.client_id, scope: this.scope, callback: response => { - this.access_token = response.access_token; - this.updateSigninStatus(true); - localStorage.setItem('google_access_token', response.access_token); + if (response?.access_token && !response?.error) { + this.access_token = response.access_token; + this.updateSigninStatus(true); + localStorage.setItem('google_access_token', response.access_token); + } }, }); };