1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Error using Google Authentication via Amplify in a Flutter web app

Discussão em 'Mobile' iniciado por Stack, Outubro 16, 2024 às 09:02.

  1. Stack

    Stack Membro Participativo

    I have a Flutter web app that uses Amplify's Authenticator component to interact with a Cognito user pool. The user pool allows both Cognito users to log in as well as using "Sign In with Google."

    When I run the application from Visual Studio Code as a Flutter web application, I am able to log in with Google correctly.

    When I compile the application and run it on an external server, the log in page shows up correctly, I can log in as a Cognito user successfully, but when I click on the Sign In With Google button, nothing happens. No new error messages show up in the Chrome console. There is an issue shown in the Issues panel that indicates

    Content Security Policy of your site blocks the use of 'eval' in JavaScript


    Expanding this issue gives a table with this information:

    Source location Directive Status
    script-src blocked

    The Source location field is empty.

    When I run from VS Code, I don't see this issue raised. So it seems possible that this is the cause of the problem, but I'm not 100% sure.

    Any ideas would be appreciated!

    Continue reading...

Compartilhe esta Página