aws / aws/aws-appsync-community

Bug: Observing "Unknown Error" while signing in AppSync console when using Cognito Userpool with TOTP MFA enabled

Open
#206 4 comments 12 reactions 0 assignees View on GitHub
pending triage
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Description: Unable to sign in to AppSync Queries console when user has opt in TOTP MFA.

Replication steps:
1. Using Amplify Console, create a new app using "Build an App" option, and Launch Amplify Studio.
2. Add authentication: I only options I changed were, to "Multi-factor authentication" : Enforced, and select only "Authenticator Application" checkbox
3. Pull the backend in local react application
4. And Signup to the app and scan QR code using Google authenticator.
5. Create an API with cognito user pool as default authentication
6. Select a userpool with TOTP MFA created above
7. Try logging in the "Queries" console in Appsync console.
8. Enter "ClientId", "username", "password", and click "Login"

Issue: UI is showing "Unkown error"

![image_error_totp](https://user-images.githubusercontent.com/88125720/153195776-64b901e1-6761-4617-a69a-c42cb2894fba.png)

In Console logs error:
main.js:146 [Report Only] Refused to connect to 'https://cognito-idp.eu-west-1.amazonaws.com/' because it violates the following Content Security Policy directive: "connect-src https://cognito-idp/.*.amazonaws.com https://eu-west-1.console.aws.amazon.com/api/ https://us-east-1.console.aws.amazon.com/feedback/custsat/ https://console.aws.amazon.com/aperture/feedback/render 'self' https://*.appsync-api.eu-west-1.amazonaws.com/graphql https://console.aws.amazon.com/panoramaroute https://console.aws.amazon.com/ https://media.amazonwebservices.com/ https://phd.aws.amazon.com/ https://console.aws.amazon.com/aperture/feedback/submit https://console.aws.amazon.com/aperture/csat/prompt wss://..............-ats.iot.eu-west-1.amazonaws.com https://ccs.amazonaws.com/ https://*.ccs.amazonaws.com https://*.analytics.console.aws.a2z.com https://..................cloudfront.net/ https://console.aws.amazon.com/feedback/custsat/ https://console.aws.amazon.com/panoramaroute/allowlist https://...............cloudfront.net/ https://eu-west-1.console.aws.amazon.com/panoramaroute/allowlist https://eu-west-1.prod.signer.console-api.aws.amazon.com/ https://eu-west-1.console.aws.amazon.com/p/ https://eu-west-1.console.aws.amazon.com/lotus/metadata https://eu-west-1.console.aws.amazon.com/panoramaroute https://us-east-1.ctrl.prod.os.notifications.aws.dev/".

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the sign-in flow in the AppSync Queries console with a Cognito user pool using enforced TOTP MFA, then inspect the browser console for the Content Security Policy error against the Cognito endpoint. Done means the console accepts the ClientId, username, password, and MFA-enabled account without showing “Unknown error”.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql
Domain
api, authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.