aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.32k stars 247 forks source link

Cognito authentication with Google: no redirection to linux app #5238

Open Romain-Guillot opened 3 months ago

Romain-Guillot commented 3 months ago

Description

When I set up Cognito authentication and run the application on Linux, the redirection does not redirect to the application when logging in with an external provider (Google): nothing happens, just a page with "Not Found"

(Note that it works as expected when running in web mode).

here the results from the repo step for running on linux :

I provided a minimal example with the demo application from the doc (Gen2) Flutter / Get Started / Quickstart.

The documentation mentions "No specific platform configuration is required." Did I miss a configuration step?

Categories

Steps to Reproduce

Repro steps demo

Steps:

Screenshots

No response

Platforms

Flutter Version

3.22.3

Amplify Flutter Version

2.3.0

Deployment Method

Amplify CLI

Schema

No response

Equartey commented 2 months ago

Hi @Romain-Guillot, thank you for the detailed steps.

replace amplify/backend.ts with the below snippet

I might have missed it, but can you point me to the backend.ts file you reference here?

Besides that, I believe this information will be enough to attempt reproducing the problem. We will provide updates as we have them, thanks.

Romain-Guillot commented 2 months ago

I might have missed it, but can you point me to the backend.ts file you reference here?

It's the file created by npm create amplify@latest -y. Here is the file for my repro app: https://github.com/Romain-Guillot/amplify-cognito-linux-demo/blob/main/amplify/backend.ts. In my case, the backend is "nothing" as I use only existing AWS resources.

It's where I put my cognito informations (as it's recommended to not create the generated config file directly)

NikaHsn commented 2 months ago

@Romain-Guillot thank you for the response and providing this information. we will look into this issue and get back to you with any updates.

Equartey commented 4 weeks ago

Hi @Romain-Guillot, can you please ensure you've following the generic platform setup for Amplify Flutter, https://docs.amplify.aws/gen1/flutter/start/project-setup/platform-setup/#linux