mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -59,7 +59,7 @@ def auth():
|
|||||||
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
||||||
"Code: ")
|
"Code: ")
|
||||||
gauth.Auth(user_input)
|
gauth.Auth(user_input)
|
||||||
gauth.SaveCredentialsFile("credentials.json")
|
gauth.SaveCredentialsFile("/root/credentials.json")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Error: {e}")
|
logging.error(f"Error: {e}")
|
||||||
return 0
|
return 0
|
||||||
@ -94,7 +94,7 @@ def refresh():
|
|||||||
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
||||||
"Code: ")
|
"Code: ")
|
||||||
gauth.Auth(user_input)
|
gauth.Auth(user_input)
|
||||||
|
gauth.SaveCredentialsFile("/root/credentials.json")
|
||||||
gauth.Authorize()
|
gauth.Authorize()
|
||||||
print("Succesfully refresh access token ..")
|
print("Succesfully refresh access token ..")
|
||||||
return 0
|
return 0
|
||||||
|
@ -59,6 +59,7 @@ class GdriveSync(plugins.Plugin):
|
|||||||
elif gauth.access_token_expired:
|
elif gauth.access_token_expired:
|
||||||
# Refresh them if expired
|
# Refresh them if expired
|
||||||
gauth.Refresh()
|
gauth.Refresh()
|
||||||
|
gauth.SaveCredentialsFile("/root/credentials.json")
|
||||||
gauth.Authorize()
|
gauth.Authorize()
|
||||||
|
|
||||||
# Create GoogleDrive instance
|
# Create GoogleDrive instance
|
||||||
|
Reference in New Issue
Block a user