Debug School

rakesh kumar
rakesh kumar

Posted on

Flutter Error:The app’s rejected due to valid login credential

Error
Your login credentials must be accessible at all times, reusable, and valid regardless of user location.
Your login credentials must be maintained at all times without any error.
Your login credentials must be provided in English. Please make sure the credentials (ID, password, etc.) that you provide do not include languages other than English.
If your app requires you to bypass the login wall with other accounts (“sign in with Google, Facebook”, etc.), please provide all account details with the detailed instructions.
If your app requires the users to set up their own password (for example, PIN, etc.), please provide the instructions and upload it on Google Play Console.
Please provide all supplements (for example, QR codes, barcodes, etc.) needed in order to bypass the login wall.

Image description

Image description

Solution

<uses-permission android:name="android.permission.INTERNET" />
Enter fullscreen mode Exit fullscreen mode
<manifest xmlns:android="http://schemas.android.com/apk/res/android"  package="com.cotocus.wizbrand.seomarketing">
 <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:label="wizbrand"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="sing
Enter fullscreen mode Exit fullscreen mode

second way

use trim option

final email = emailController.text.trim(); // Trim extra spaces
    final password = passwordController.text.trim(); // Trim extra spaces
Enter fullscreen mode Exit fullscreen mode
ElevatedButton(
  onPressed: () async {
    final email = emailController.text.trim(); // Trim extra spaces
    final password = passwordController.text.trim(); // Trim extra spaces
    await loginViewModel.login(email, password);
    if (loginViewModel.errorMessage == null) {
      Navigator.pushReplacement(
        context,
        MaterialPageRoute(builder: (context) => HomeScreen()),
      );
    }
  },
  child: Text('Continue'),
  style: ElevatedButton.styleFrom(
    backgroundColor: Colors.blue,
    minimumSize: Size(double.infinity, 50),
  ),
Enter fullscreen mode Exit fullscreen mode

),

Top comments (0)