From 937bc15b83c0e7c839004a08da364ab4d7a6334e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 5 Feb 2020 16:29:46 +0100 Subject: [PATCH] Support SSO with Firefox accounts (#3337) --- CHANGES.rst | 2 +- .../im/vector/activity/FallbackAuthenticationActivity.kt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1a750a7a9d..4f75c6aa36 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ Features ✨: - Improvements 🙌: - - + - Support SSO with Firefox accounts (#3337) Other changes: - diff --git a/vector/src/main/java/im/vector/activity/FallbackAuthenticationActivity.kt b/vector/src/main/java/im/vector/activity/FallbackAuthenticationActivity.kt index 1f40d317cb..647e060b8b 100644 --- a/vector/src/main/java/im/vector/activity/FallbackAuthenticationActivity.kt +++ b/vector/src/main/java/im/vector/activity/FallbackAuthenticationActivity.kt @@ -65,6 +65,11 @@ class FallbackAuthenticationActivity : VectorAppCompatActivity() { mMode = intent.getIntExtra(EXTRA_IN_MODE, MODE_LOGIN) mWebView.settings.javaScriptEnabled = true + + // Enable local storage to support SSO with Firefox accounts + mWebView.settings.domStorageEnabled = true + mWebView.settings.databaseEnabled = true + // Due to https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html, we hack // the user agent to bypass the limitation of Google, as a quick fix (a proper solution will be to use the SSO SDK) mWebView.settings.userAgentString = "Mozilla/5.0 Google"