I get "This page has been reloaded" error, even though I haven't refreshed the page

Sometimes when I try to log in via google or apple id the web3auth modal shows error because I refreshed the page even though I did not refresh the page. This is a very random thing, it can happen once and then work perfectly for the next few hours.

There are no errors in the console

Future<void> setupWeb3Auth() async {
  if (_initializedWeb3Auth) return;

  Uri redirectUrl;
  if (Platform.isAndroid) {
    redirectUrl = Uri.parse(
        'torusapp://org.torusresearch.${dotenv.get("BITRISEIO_PACKAGE_NAME")}/auth');
  } else if (Platform.isIOS) {
    redirectUrl = Uri.parse('${dotenv.get("BITRISEIO_PACKAGE_NAME")}://auth');
  } else {
    throw UnKnownException('Unknown platform');
  }

  await Web3AuthFlutter.init(
    Web3AuthOptions(
      clientId: dotenv.get('WEB3_AUTH_CLIENT_ID'),
      network: dotenv.get('IS_INTERNAL') == 'true'
          ? Network.sapphire_devnet
          : Network.sapphire_mainnet,
      redirectUrl: redirectUrl,
      whiteLabel: WhiteLabelData(
        mode: ThemeModes.dark,
        defaultLanguage: Language.en,
      ),
    ),
  );

  await Web3AuthFlutter.initialize();

  _initializedWeb3Auth = true;
}

Future<void> _loginWithWeb3Auth(
  BuildContext context, {
  required web3auth.Provider provider,
  required WidgetRef ref,
  W3MService? w3mService,
}) async {
  Navigator.pop(context);
  await Web3AuthFlutter.login(
    LoginParams(loginProvider: provider),
  ).then((e) {
    // ....
  });
}

@andrii1 Welcome Aboard!

Could you please click the red ! mark on the error screen and share the complete logs ?

[
   {
      "errorMsg":"Redirect Result Error",
      "errorStack":"This page has been reloaded and should not be. Please start the login process again.",
      "title":"displayError from custom auth error handler",
      "createdAt":"03/06/2024, 10:18:57",
      "info":{
         "customAuthState":{
            "client":"BJ4GEa9v1UADlyar1Fg-rndpOoaRznI79HyKQy1XRkWUoMX8HL6BYBEswsdndBN_WLVBKwK8yUMnCswwqXb32vY",
            "currentLoginProvider":"google",
            "popupWindow":"false",
            "whiteLabel":"{\"mode\":\"dark\",\"defaultLanguage\":\"en\"}",
            "keyMode":"v1",
            "isCustomVerifier":"false",
            "socialFactorFlow":"",
            "loginId":"a0eaee046b68b2213a4d83d1f5aa257e27b024f95c07c8d11063a712e542572f",
            "sessionNamespace":"",
            "version":"8",
            "instanceId":"mbl024o6flf",
            "verifier":"web3auth",
            "typeOfLogin":"google",
            "redirectToOpener":false
         },
         "customAuthError":"Unsupported method type",
         "customAuthHashParams":{
            "state":"eyJjbGllbnQiOiJCSjRHRWE5djFVQURseWFyMUZnLXJuZHBPb2FSem5JNzlIeUtReTFYUmtXVW9NWDhITDZCWUJFc3dzZG5kQk5fV0xWQkt3Szh5VU1uQ3N3d3FYYjMydlkiLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imdvb2dsZSIsInBvcHVwV2luZG93IjoiZmFsc2UiLCJ3aGl0ZUxhYmVsIjoie1wibW9kZVwiOlwiZGFya1wiLFwiZGVmYXVsdExhbmd1YWdlXCI6XCJlblwifSIsImtleU1vZGUiOiJ2MSIsImlzQ3VzdG9tVmVyaWZpZXIiOiJmYWxzZSIsInNvY2lhbEZhY3RvckZsb3ciOiIiLCJsb2dpbklkIjoiYTBlYWVlMDQ2YjY4YjIyMTNhNGQ4M2QxZjVhYTI1N2UyN2IwMjRmOTVjMDdjOGQxMTA2M2E3MTJlNTQyNTcyZiIsInNlc3Npb25OYW1lc3BhY2UiOiIiLCJ2ZXJzaW9uIjoiOCIsImluc3RhbmNlSWQiOiJtYmwwMjRvNmZsZiIsInZlcmlmaWVyIjoid2ViM2F1dGgiLCJ0eXBlT2ZMb2dpbiI6Imdvb2dsZSIsInJlZGlyZWN0VG9PcGVuZXIiOmZhbHNlfQ",
            "access_token":"ya29.a0AXooCgssIYQHadxmQfEk8X6rcrYiU44uXwhJTrOdd8gs7OM4wz_11DGWPb9Az-z7hh4sK6OOmTZ2chIoLxSl_Mfo88o5iygVUv0t5wBa5_8vMeKo35T5_nk1QmDnqQc9DpnTAae42961XZ31GKwcVDo5wxnZNafVcgaCgYKARISARASFQHGX2MiBzIHM5paRQ0310F0cqQTKA0169",
            "token_type":"Bearer",
            "expires_in":"3599",
            "scope":"email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid",
            "id_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjY3MTk2NzgzNTFhNWZhZWRjMmU3MDI3NGJiZWE2MmRhMmE4YzRhMTIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI4NzY3MzMxMDUxMTYtZ2tzbnVwM2JtMG5uZ3B1Y21lcnJwOXFydDE1aWdjaWguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI4NzY3MzMxMDUxMTYtZ2tzbnVwM2JtMG5uZ3B1Y21lcnJwOXFydDE1aWdjaWguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTAxNzYyODExNDUwMjgyNzUxNTAiLCJlbWFpbCI6Im1hbWFva3NhbmEwMzE5ODBAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJ0ZjllaW1CQVFoMFdRLWN2V3I5Q3ZnIiwibm9uY2UiOiJtYmwwMjRvNmZsZiIsIm5iZiI6MTcxNzM5ODgzNiwibmFtZSI6Ik9rc2FuYSIsInBpY3R1cmUiOiJodHRwczovL2xoMy5nb29nbGV1c2VyY29udGVudC5jb20vYS9BQ2c4b2NMQXdWWEppVjRjMGlOUGdfeTM1MGRaeE03a1ZiTXFqR0tidDRZZFhqRjBLTHZFckE9czk2LWMiLCJnaXZlbl9uYW1lIjoiT2tzYW5hIiwiaWF0IjoxNzE3Mzk5MTM2LCJleHAiOjE3MTc0MDI3MzYsImp0aSI6ImZiYzA0NDkyZTYyYzgzM2E0NWU2NjcyM2MyNzBmOTg1YzFmZGY0NzUifQ.RTc2gbDqdweI7Q_FW_HbHhZO9_ALrCwx0FUQpBZxx4OK2VSYgYIin1OU9S30ZAy-daYf16Ca3Ci94lV6ln8e-O9vJZ5s8MYFFwxkXQGC3ndGnYN2i8b83iLkq_ckjztvzQDx2cPcs04n09SS-0F7dwGCbqCUT1_l9ZvgIjWV7RyZQN20HjDblciYpUqrBPls7S9EIdRXPgCtQuRzbStmRfAi8UIECupTVYXhaRlPghV9hnIdD3Rt0TK_tdRd1KNbbkXhpJxWJpDSF_4HLTFqETADZF36JbrHdJaoMLWpUn7PIGuq5Ws-fzAHSNeQh9V4XLvczPCDSAHgmrdrF9CoVQ",
            "authuser":"2",
            "prompt":"consent",
            "version_info":"CmxfU1ZJX0VQTEV3cXZ5dm9ZREdBa2lQMDFCUlVSSVpsOXhiVGxQWkd0dWJrazRkMEV5UjJSV1JsbE9ZbGhQVkRabkxUbHlZa2RvTFRKRWRYWnFORUpGVWtnd1NFNXVZVEUyTkVaUFoxSXhhd18"
         }
      }
   }
]

Thanks for sharing the logs, we’ll share it with team and try to reproduce the issue. We’ll update you as soon as possible