diff --git a/.configure b/.configure
index f4306f2baab6..c633c89e7acf 100644
--- a/.configure
+++ b/.configure
@@ -1,7 +1,7 @@
{
"project_name": "WordPress-Android",
"branch": "trunk",
- "pinned_hash": "11fa9c59619ba8d31d0bce2b7ba4412074c00d69",
+ "pinned_hash": "1c83426e3f9175a6d561f4af53c69a1e2097a6ef",
"files_to_copy": [
{
"file": "android/WPAndroid/secrets.properties",
@@ -47,4 +47,4 @@
"file_dependencies": [
]
-}
+}
\ No newline at end of file
diff --git a/.configure-files/secrets.properties.enc b/.configure-files/secrets.properties.enc
index ea962b70e4c4..481fdf15ab16 100644
Binary files a/.configure-files/secrets.properties.enc and b/.configure-files/secrets.properties.enc differ
diff --git a/WordPress/build.gradle b/WordPress/build.gradle
index 366aa3ae6cf5..7e43b5fb749f 100644
--- a/WordPress/build.gradle
+++ b/WordPress/build.gradle
@@ -209,6 +209,7 @@ android {
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"org.wordpress.android"'
buildConfigField "boolean", "ENABLE_QRCODE_AUTH_FLOW", "false"
buildConfigField "boolean", "ENABLE_OPEN_WEB_LINKS_WITH_JP_FLOW", "true"
+ buildConfigField "String", "WPCOM_REDIRECT_URI", '"wordpress://wpcom-authorize"'
manifestPlaceholders = [magicLinkScheme:"wordpress"]
}
@@ -229,6 +230,7 @@ android {
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"com.jetpack.android"'
buildConfigField "boolean", "ENABLE_QRCODE_AUTH_FLOW", "true"
buildConfigField "boolean", "ENABLE_OPEN_WEB_LINKS_WITH_JP_FLOW", "false"
+ buildConfigField "String", "WPCOM_REDIRECT_URI", '"jetpack://wpcom-authorize"'
manifestPlaceholders = [magicLinkScheme:"jetpack"]
@@ -443,6 +445,8 @@ dependencies {
implementation(libs.google.mlkit.text.recognition)
implementation(libs.google.mlkit.barcode.scanning.main)
+ implementation(libs.androidx.browser)
+
// CameraX
implementation(libs.androidx.camera.camera2)
implementation(libs.androidx.camera.lifecycle)
diff --git a/WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/LoginPrologueRevampedFragment.kt b/WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/LoginPrologueRevampedFragment.kt
index 597a8d55a5a5..e12b0359e1d3 100644
--- a/WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/LoginPrologueRevampedFragment.kt
+++ b/WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/LoginPrologueRevampedFragment.kt
@@ -56,7 +56,7 @@ class LoginPrologueRevampedFragment : Fragment() {
LoginScreenRevamped(
onWpComLoginClicked = {
viewModel.onWpComLoginClicked()
- loginPrologueListener.showEmailLoginScreen()
+ loginPrologueListener.showWPcomLoginScreen(this.context)
},
onSiteAddressLoginClicked = {
viewModel.onSiteAddressLoginClicked()
diff --git a/WordPress/src/main/AndroidManifest.xml b/WordPress/src/main/AndroidManifest.xml
index d89022fac6cf..1549c759becf 100644
--- a/WordPress/src/main/AndroidManifest.xml
+++ b/WordPress/src/main/AndroidManifest.xml
@@ -113,7 +113,18 @@
+ android:windowSoftInputMode="adjustResize"
+ android:exported="true">
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WordPress/src/main/java/org/wordpress/android/modules/AppConfigModule.java b/WordPress/src/main/java/org/wordpress/android/modules/AppConfigModule.java
index 8845f7dbe586..2b0d1d4e898e 100644
--- a/WordPress/src/main/java/org/wordpress/android/modules/AppConfigModule.java
+++ b/WordPress/src/main/java/org/wordpress/android/modules/AppConfigModule.java
@@ -3,6 +3,8 @@
import android.content.Context;
import android.util.Base64;
+import androidx.annotation.NonNull;
+
import com.goterl.lazysodium.utils.Key;
import org.wordpress.android.BuildConfig;
@@ -19,12 +21,13 @@
import dagger.hilt.android.qualifiers.ApplicationContext;
import dagger.hilt.components.SingletonComponent;
+
@InstallIn(SingletonComponent.class)
@Module
public class AppConfigModule {
- @Provides
+ @NonNull @Provides
public AppSecrets provideAppSecrets() {
- return new AppSecrets(BuildConfig.OAUTH_APP_ID, BuildConfig.OAUTH_APP_SECRET);
+ return new AppSecrets(BuildConfig.OAUTH_APP_ID, BuildConfig.OAUTH_APP_SECRET, BuildConfig.WPCOM_REDIRECT_URI);
}
@Singleton
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/accounts/LoginActivity.java b/WordPress/src/main/java/org/wordpress/android/ui/accounts/LoginActivity.java
index bb4aee4850b8..ae34dd22e879 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/accounts/LoginActivity.java
+++ b/WordPress/src/main/java/org/wordpress/android/ui/accounts/LoginActivity.java
@@ -1,6 +1,7 @@
package org.wordpress.android.ui.accounts;
import android.app.Activity;
+import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@@ -9,6 +10,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.browser.customtabs.CustomTabsIntent;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelProvider;
@@ -58,8 +60,10 @@
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Click;
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Flow;
import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Source;
+import org.wordpress.android.ui.accounts.UnifiedLoginTracker.Step;
import org.wordpress.android.ui.accounts.login.LoginPrologueListener;
import org.wordpress.android.ui.accounts.login.LoginPrologueRevampedFragment;
+import org.wordpress.android.ui.accounts.login.WPcomLoginHelper;
import org.wordpress.android.ui.accounts.login.jetpack.LoginNoSitesFragment;
import org.wordpress.android.ui.accounts.login.jetpack.LoginSiteCheckErrorFragment;
import org.wordpress.android.ui.main.ChooseSiteActivity;
@@ -130,6 +134,7 @@ private enum SmartLockHelperState {
private LoginMode mLoginMode;
private LoginViewModel mViewModel;
+ @Inject protected WPcomLoginHelper mLoginHelper;
@Inject DispatchingAndroidInjector