Comments (11)
You can find all the creds
Amplify.configure({
Auth: {
identityPoolId: 'XX', (Federated Identities > Selected Identity Pool/Create new > Sample code > Select Javascript > Get AWS Credentials)
region: 'us-east-1', (User pools > General Settings > Pool Id) The first part of the Pool Id us-east-1
userPoolId: 'us-east-1_XXXXXX', (User pools > General Settings > Pool Id)
userPoolWebClientId: 'XXXXXXXXX', (User pools > General Settings > App clients > App client id)
},
});
userPoolWebClientId: Make sure you don’t have a secret key in the input field
edit: I realize you can find this information if you add your App client id to the Federated Identities. You need to click on edit identity pool
from amplify-js.
@jonsmirl - this is great, was completely stuck because I did not know secret needed to be unchecked.
FYI @mlabieniec - As you seem to be owning this repo (thank you!) and the mobile-cli, I though I'd share my (new) customer flow:
- Hmm… AWS Amplify helps me integrate AWS in my JS app, maybe I can add this to my React app.
- Let's add authentication, I scroll down to the Add Authentication to your App section.
- Hmmm… what's this
aws-exports
(note, as a customer I haven't used the mobile-cli before)? - Scroll up to Documentation and select the Authentication link.
- I scroll down to the Manual Set-Up section, where I learn I need to input the values for
{identityPoolId, region, userPoolId, userPoolWebClientId}
- I create a user pool with AWS Cognito
- Still does not work…?
- Ah… I guess I need to go the Federated Identities tab in AWS Cognito?
- I create one with the default settings
- Hmmm… when
userPoolId
is provided,userPoolWebClientId
becomes required. - Let's create an app with the default settings (note, with the default settings a secret is generated for the app)
- Still does not work, because of the secret on the app.
- Get stuck, and with quite a bit of googling find this closed issue.
- Re-create the app without a secret.
- Success!
My suggestions to fix this customer flow:
- User test — I am certain a great deal of these issues would emerge.
- Under the Add Authentication to your App add link-outs to the more detailed Authentication documentation.
Happy to provide more detail and help out.
PS: we're both part of Amazon, so hit me up via the Phonetool or Chime ;-)
from amplify-js.
Another item for docs. The authorized applications on your User Pool have to be duplicated onto the linked Federation Pool. I had only authorized my app on the User Pool and spent an hour figuring out that it was failing because the app has to be authorized in two places.
from amplify-js.
@DanielApt we are working on overhauling the docs and this is on our list to update as well, thank you for this feedback though definitely helpful
from amplify-js.
@jonsmirl thanks for the feedback. The Cognito docs have this within the Integrating User Pools for JavaScript Apps
I'm not clear on what you mean by the application duplicated onto the Federation Pool. Do you mean needing to add the User Pool to the Federated Identity Pool as a provider? If so, this is detailed within the Cognito docs as well here
We'll try and see if we can clarify this better within the docs here when manually creating resources and/or linking existing. Thanks for the feedback.
from amplify-js.
As an additional note:
According to the manual setup mentioned by @DanielApt, the userPoolWebClientId should be in this format:
userPoolWebClientId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito Web Client ID
Which is not true (at least not for me), the prefix hinting at the region should NOT be there!
from amplify-js.
Yeah that thew me off as well. Mine is a 26 digits and characters string. No region.
from amplify-js.
The config object does not match any of the naming convention in the AWS Cognito console. I can't get passed this treasure hunt of finding all of these strings.
from amplify-js.
Small note, the main docs are still not updated Angular quick start. userPoolWebClient
still has a different format.
The more detailed Authentication page has the correct format though.
from amplify-js.
What should I use for the app client which is going to be used for the mobile app? userPoolWebClientId
is for the Web app only I guess.
from amplify-js.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
from amplify-js.
Related Issues (20)
- Trying to call rest api from getserversideprops gives me 401 unauthorized error HOT 5
- Nested Relational Data Not Returned in GraphQL API Queries on AWS Amplify HOT 5
- DataStore synchronization issues with DataStore under poor network conditions HOT 8
- Amplify v5 build fails when adding amazon-cognito-identity-js because duplicate symbols HOT 10
- signOut() is asking users to sign in again when using apple as identity provider HOT 5
- NotImplemented: A header you provided implies functionality that is not implemented - AWS Amplify Storage remove() HOT 19
- SignIn call gave error - AuthUserPoolException: Auth UserPool not configured. HOT 12
- Type error: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'. HOT 4
- Datastore.query returns undefined when user logs out and logs in again.React JS Amplify HOT 4
- signInWithRedirect always fails with signInWithRedirect_failure (Using Cognito) HOT 2
- FormData Related Exception When Utilizing Node.js <16.15.0 HOT 1
- Remembered device's friendly name HOT 3
- Resending confirmation code is working but not sending email. HOT 2
- Jest test fails because of incorrectly loaded react native modules HOT 1
- oauthTokenRefreshException thrown but not using oauth flow HOT 10
- Pinpoint endpoint user ID keeps getting set to identityId HOT 5
- Amplify V6 -- signin and confirmsignin cannot work separatly? HOT 6
- UnexpectedSignInInterruptionException during sign-in affecting a subset of users after upgrade to Amplify v6 HOT 11
- getCurrentUser won't work in Next js 14 HOT 2
- Getting NoCredentials Error while performing List, Upload and Other file actions on S3 bucket from Amplify V6 react application HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-js.