From 1ef0c5c23fdeef160833ae93dbefb32c67da74c5 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 9 Jan 2024 07:35:14 +0100 Subject: [PATCH] Increased OAUTH session time to 20 minutes --- app/src/main/java/eu/faircode/email/FragmentOAuth.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java index b31c5c4739..41070d9e8c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java +++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java @@ -142,6 +142,7 @@ public class FragmentOAuth extends FragmentBase { private static final String FAIREMAIL_RANDOM = "fairemail.random"; private static final String FAIREMAIL_EXPIRE = "fairemail.expire"; private static final int MAILRU_TIMEOUT = 20 * 1000; // milliseconds + private static final long OAUTH_TIMEOUT = 20 * 60 * 1000L; @Override public void onCreate(Bundle savedInstanceState) { @@ -426,7 +427,7 @@ public class FragmentOAuth extends FragmentBase { Uri.parse(tokenEndpoint)); int random = Math.abs(new SecureRandom().nextInt()); - long expire = new Date().getTime() + 10 * 60 * 1000L; + long expire = new Date().getTime() + OAUTH_TIMEOUT; AuthState authState = new AuthState(serviceConfig); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String key = "oauth." + provider.id + (graph ? ":graph" : "");