Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-13 09:32:10 +02:00
parent 653bf7f05b
commit 7179ca6652
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ def auth():
"complete the verification and then copy/paste the code from addressbar.\n\n"
"Code: ")
gauth.Auth(user_input)
gauth.SaveCredentialsFile("credentials.json")
gauth.SaveCredentialsFile("/root/credentials.json")
except Exception as e:
logging.error(f"Error: {e}")
return 0
@ -94,7 +94,7 @@ def refresh():
"complete the verification and then copy/paste the code from addressbar.\n\n"
"Code: ")
gauth.Auth(user_input)
gauth.SaveCredentialsFile("/root/credentials.json")
gauth.Authorize()
print("Succesfully refresh access token ..")
return 0

View File

@ -59,6 +59,7 @@ class GdriveSync(plugins.Plugin):
elif gauth.access_token_expired:
# Refresh them if expired
gauth.Refresh()
gauth.SaveCredentialsFile("/root/credentials.json")
gauth.Authorize()
# Create GoogleDrive instance