From 9b8d9b2270cbc5a1c6bd9b9894b800bd4925275e Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:38:55 -0700 Subject: [PATCH] You do need this to get refresh_token --- src/paperless_mail/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paperless_mail/oauth.py b/src/paperless_mail/oauth.py index 65060a636..af64e48a6 100644 --- a/src/paperless_mail/oauth.py +++ b/src/paperless_mail/oauth.py @@ -64,7 +64,7 @@ class PaperlessMailOAuth2Manager: self.gmail_client.get_authorization_url( redirect_uri=self.oauth_callback_url, scope=["https://mail.google.com/"], - extras_params={"access_type": "offline"}, + extras_params={"prompt": "consent", "access_type": "offline"}, ), )