I am trying to implement a social oauth for a flutter app, but the screen gets stuck after account selection in both google and facebook authentication. This was working until a few weeks ago, but suddenly stopped working last week, no one has made any changes in this part of the codebase during this time. The screen looks as below: enter image description here The google auth code is as follows:

//google signin flow
  Future<void> googleSignIn({required context}) async {
    try {
      print('in try block google');
      final result = await Amplify.Auth.signInWithWebUI(
        provider: AuthProvider.google,
      );
      print('inside try google sign in');
      Navigator.push(
          context, MaterialPageRoute(builder: (context) => const WelcomePage()));
      safePrint('Sign in result: $result');
    } on AuthException catch (e) {
      safePrint('Error signing in: ${e.message}');
    }
  }

I tried a few debugging steps like adding the print lines. The 'in try block google' gets printed, which means the function call enters the try block, but after that the next line i.e. 'inside try google sign in' is not printed. That means the final result doesn't receive its value from the await call.

0

There are 0 best solutions below