From 152c8b45d01cfbf3fcafbafdecd1e6dfa635cd84 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Thu, 17 Mar 2022 21:52:06 +0100 Subject: [PATCH] enable JavaScript in LoginWebViewActivity --- .../tusky/components/login/LoginWebViewActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt index fbe4519d..01f6c3b0 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt @@ -1,5 +1,6 @@ package com.keylesspalace.tusky.components.login +import android.annotation.SuppressLint import android.app.Activity import android.content.Context import android.content.Intent @@ -93,6 +94,9 @@ class LoginWebViewActivity : BaseActivity(), Injectable { webView.settings.databaseEnabled = false webView.settings.displayZoomControls = false webView.settings.javaScriptCanOpenWindowsAutomatically = false + // Javascript needs to be enabled because otherwise 2FA does not work in some instances + @SuppressLint("SetJavaScriptEnabled") + webView.settings.javaScriptEnabled = true webView.settings.userAgentString += " Tusky/${BuildConfig.VERSION_NAME}" val oauthUrl = data.oauthRedirectUrl