Store cookie outside of /tmp
This commit is contained in:
parent
4959b92178
commit
1744e3bbdf
@ -1,6 +1,7 @@
|
||||
[apple]
|
||||
email = apple_icloud_email
|
||||
password = apple_icloud_password
|
||||
cookie_directory = COOKIE_DIRECTORY
|
||||
|
||||
[nextcloud]
|
||||
server = https://cloud.example.com
|
||||
|
@ -99,12 +99,12 @@ def get_icloud_location(config):
|
||||
global code_2fa
|
||||
email = config['apple']['email']
|
||||
password = config['apple']['password']
|
||||
api = PyiCloudService(email, password)
|
||||
api = PyiCloudService(email, password=password, cookie_directory=config['apple']['cookie_directory'])
|
||||
|
||||
if api.requires_2fa:
|
||||
print(
|
||||
"Two-factor authentication required. "
|
||||
"Head over to http://localhost:8080 and fill-in the 2FA code."
|
||||
f"Head over to http://{config['webserver']['host']}:{config['webserver']['port']} and fill-in the 2FA code."
|
||||
)
|
||||
server = StoppableCherootServer(
|
||||
host=config['webserver']['host'],
|
||||
|
Loading…
Reference in New Issue
Block a user