Amplify Flutter - URL after login still shows the authorisation code and state

59 Views Asked by At

Flutter Web application configured to use Social Sign in (Google), once logged in, the home page is displayed correctly but the URL in the browser still has some part of the authorisation code redirect URL.

Actual behaviour: http://localhost:55654/?code=df60725d-2691-4727-a17b-62d74589718b&state=LaojeAF6MoTS0r129tId3nB4TvAISSq3

Expected behaviour: http://localhost:55654/

flutter sdk:

environment:
  sdk: '>=3.2.3 <4.0.0'

dependencies:

  amplify_flutter: ^1.6.1
  amplify_auth_cognito: ^1.6.1
  amplify_authenticator: ^1.5.2

Amplify Authenticator configured as:

Widget build(BuildContext context) {
    return Authenticator(
      child: MaterialApp(
        builder: Authenticator.builder(),
        home: MyHomePage(),
      ),
    );
  }

flutter app run as:

flutter build -v web --web-renderer html

AWS Cognito User Pool configured already and also defined an App in the Google Console for Social Auth.

Login from the Flutter App using Google Social Auth is working fine, however the URL of the logged in page still has the authorisation code and state details in it.

0

There are 0 best solutions below