Closed Bersaelor closed 1 year ago
If I don't provide the Identity Pool ID (I have not used an Identity pool in other apps, and they authenticated fine without one), I get
signIn_failure: Username and pool information are required.
cognitoHostedUI_failure: Username and pool information are required.
customState_failure: Username and pool information are required.
and the 400 for cognito-identity.us-east-1.amazonaws.com doesn't pop up.
This seems the same problem as this one
Alright, so it turns out what fixed it was replacing:
scope: [
"email"
],
with
scope: [
"email",
"openid"
],
so it seems you have to match the values that are enabled in the AWS console for the User pool exactly.
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
I'm currently trying to setup a Solid.js app AWS Auth so I can use my cognito pools with a Hosted UI. I have done this a few times with React based apps, but there I always relied on aws-amplify-react for the UI components, not the Hosted UI.
Now, in my main
index.js
I setup AWS usingAmplify.configure(awsConfig)
withand when I click the signIn button it forwards me to the Hosted UI, hosted on
auth.mydomain.art
. After entering username+password, it redirects me back tohttp://localhost:3000/?code=***
with the code supplied. Then the code seems to be used & disposed by the Amplify-Auth, so that is disappears. Then I can see ain the console and some errors around
'A failure occurred when returning to the Cognito Hosted UI
.Expected behavior
AWS Auth consumes the code and
Auth.currentAuthenticatedUser()
returns an authenticated userReproduction steps
Amplify.configure(awsConfig)
during page startupAuth.federatedSignIn()
and get forwarded to the Hosted UICode Snippet
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response