|
|
@@ -95,8 +95,12 @@ this.GDrive = this.GDrive || (() => {
|
|
|
});
|
|
|
const response = await getJSON(httpResponse);
|
|
|
this.accessToken = response.access_token;
|
|
|
- this.refreshToken = response.refresh_token;
|
|
|
- this.expirationDate = Date.now() + (response.expires_in * 1000);
|
|
|
+ if (response.refresh_token) {
|
|
|
+ this.refreshToken = response.refresh_token;
|
|
|
+ }
|
|
|
+ if (response.expires_in) {
|
|
|
+ this.expirationDate = Date.now() + (response.expires_in * 1000);
|
|
|
+ }
|
|
|
return { accessToken: this.accessToken, refreshToken: this.refreshToken, expirationDate: this.expirationDate };
|
|
|
}
|
|
|
}
|