mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -71,13 +71,6 @@ def refresh():
|
|||||||
try:
|
try:
|
||||||
# Try to load saved client credentials
|
# Try to load saved client credentials
|
||||||
gauth.LoadCredentialsFile("/root/credentials.json")
|
gauth.LoadCredentialsFile("/root/credentials.json")
|
||||||
except pydrive2.auth.InvalidCredentialsError:
|
|
||||||
print(gauth.GetAuthUrl())
|
|
||||||
user_input = input("Please copy this URL into a browser, "
|
|
||||||
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
|
||||||
"Code: ")
|
|
||||||
gauth.Auth(user_input)
|
|
||||||
|
|
||||||
if gauth.access_token_expired:
|
if gauth.access_token_expired:
|
||||||
if gauth.credentials is not None:
|
if gauth.credentials is not None:
|
||||||
try:
|
try:
|
||||||
@ -95,6 +88,13 @@ 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)
|
||||||
|
except pydrive2.auth.InvalidCredentialsError:
|
||||||
|
print(gauth.GetAuthUrl())
|
||||||
|
user_input = input("Please copy this URL into a browser, "
|
||||||
|
"complete the verification and then copy/paste the code from addressbar.\n\n"
|
||||||
|
"Code: ")
|
||||||
|
gauth.Auth(user_input)
|
||||||
|
|
||||||
gauth.Authorize()
|
gauth.Authorize()
|
||||||
print("No refresh is required.")
|
print("No refresh is required.")
|
||||||
return 0
|
return 0
|
||||||
|
Reference in New Issue
Block a user