diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt index 00b1a84a0ee..7a5439c8413 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/LoginActivity.kt @@ -526,6 +526,7 @@ class LoginActivity : AppCompatActivity(), SslUntrustedCertDialog.OnSslUntrusted codeChallenge = authenticationViewModel.codeChallenge, state = authenticationViewModel.oidcState, username = username, + sendLoginHintAndUser = resources.getBoolean(R.bool.send_login_hint_and_user), ) try { diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/oauth/OAuthUtils.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/oauth/OAuthUtils.kt index e71ee4204f0..8036404e19b 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/oauth/OAuthUtils.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/authentication/oauth/OAuthUtils.kt @@ -105,7 +105,8 @@ class OAuthUtils { prompt: String, codeChallenge: String, state: String, - username: String? + username: String?, + sendLoginHintAndUser: Boolean, ): Uri = authorizationEndpoint.buildUpon().apply { appendQueryParameter(QUERY_PARAMETER_REDIRECT_URI, redirectUri) @@ -116,7 +117,7 @@ class OAuthUtils { appendQueryParameter(QUERY_PARAMETER_CODE_CHALLENGE, codeChallenge) appendQueryParameter(QUERY_PARAMETER_CODE_CHALLENGE_METHOD, CODE_CHALLENGE_METHOD) appendQueryParameter(QUERY_PARAMETER_STATE, state) - if (!username.isNullOrEmpty()) { + if (sendLoginHintAndUser && !username.isNullOrEmpty()) { appendQueryParameter(QUERY_PARAMETER_USER, username) appendQueryParameter(QUERY_PARAMETER_LOGIN_HINT, username) } diff --git a/owncloudApp/src/main/res/values/setup.xml b/owncloudApp/src/main/res/values/setup.xml index ab76806838e..fbb92c8db47 100644 --- a/owncloudApp/src/main/res/values/setup.xml +++ b/owncloudApp/src/main/res/values/setup.xml @@ -143,4 +143,7 @@ true + + true +