Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 4145a5d

Browse files
committed
Get around Google limitation of SSO through WebView by modifying the WebView user agent
1 parent 89d19a6 commit 4145a5d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Improvements:
1212
-
1313

1414
Other changes:
15-
-
15+
- Get around Google limitation of SSO through WebView by modifying the WebView user agent
1616

1717
Bugfix:
1818
-

vector/src/main/java/im/vector/activity/FallbackAuthenticationActivity.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ class FallbackAuthenticationActivity : VectorAppCompatActivity() {
6565
mMode = intent.getIntExtra(EXTRA_IN_MODE, MODE_LOGIN)
6666

6767
mWebView.settings.javaScriptEnabled = true
68+
// Due to https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html, we hack
69+
// the user agent to bypass the limitation of Google, as a quick fix (a proper solution will be to use the SSO SDK)
70+
mWebView.settings.userAgentString = "Mozilla/5.0 Google"
6871

6972
mHomeServerUrl = getString(R.string.default_hs_server_url)
7073

0 commit comments

Comments
 (0)