From dead68f5da8f70d7c7fa3a615865c39b4d3c1cb0 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:19:17 +0400 Subject: [PATCH] config/emacs: I DID IT HHAAHAHUDHUWAHFUIOWAHGUIO --- config/emacs/.offlineimap.py | 8 -------- config/emacs/.offlineimaprc | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/config/emacs/.offlineimap.py b/config/emacs/.offlineimap.py index 77a09b04..665407b9 100644 --- a/config/emacs/.offlineimap.py +++ b/config/emacs/.offlineimap.py @@ -34,14 +34,6 @@ def get_client_secret(account): return re.search(rb"client_secret: (.*)", cmd, flags=0).group(1) -def get_client_token(account): - cmd = check_output("pass " + account, shell=True) - - output = re.search("client_token: (.*)", cmd.decode(), flags=0).group(1) - - return output - - def get_client_refresh_token(account): cmd = check_output("pass " + account, shell=True) diff --git a/config/emacs/.offlineimaprc b/config/emacs/.offlineimaprc index d5011dff..bea21ee0 100644 --- a/config/emacs/.offlineimaprc +++ b/config/emacs/.offlineimaprc @@ -38,7 +38,6 @@ remoteport = 993 auth_mechanisms = XOAUTH2 oauth2_request_url = https://login.microsoftonline.com/common/oauth2/v2.0/token oauth2_client_id = 9e5f94bc-e8a4-4e73-b8be-63364c29d753 -# oauth2_client_secret = "" +oauth2_client_secret = oauth2_refresh_token_eval = get_client_refresh_token("Microsoft") -oauth2_access_token_eval = get_client_token("Microsoft") folderfilter = lambda folder: not folder.startswith('Calendar') and not folder.startswith('Contacts') \ No newline at end of file