aws-cognito

AWS Amplify: How to setup { withConnector } component?

随声附和 提交于 2019-12-23 05:17:07
问题 Following the Amplify Quick Start I set up an AWS Mobile App with the awsmobile-cli : awsmobile init awsmobile user-signin enable awsmobile push In my react App I configured Amplify like so (I also tried manual configuration): import Amplify from 'aws-amplify'; import aws_exports from '../../aws-exports.js'; Amplify.configure(aws_exports); import { withAuthenticator } from 'aws-amplify-react'; ... export default withAuthenticator(App); This Code shows me the Cognito UI , but on any action, I

send email when user registers - AWS Cognito federated Identities

和自甴很熟 提交于 2019-12-22 08:49:40
问题 How can i send an email/trigger a lambda function when a new user registers? Under "edit identity pool" i only found a sync trigger. If i understand correctly: This one is triggered every time a user syncs his data... Is there any way to trigger a lambda function only for the "initial" sync or when a certain dataset is created for the user? Edit: To be more specific: I do create the user via lambdas using the JS SDK. I use developer authentication with my own oauth2 flow. I don't know how to

AWS - nodejs SDK - CognitoIdentityServiceProvider.initiateAuth - CredentialsError: Missing credentials in config

限于喜欢 提交于 2019-12-21 14:13:35
问题 I'm trying to get authentication working through my API using AWS Cognito with a user pool. I have a user created through an AWS Cognito User Pool and I'm trying to log in with the user. The error I'm getting is CredentialsError: Missing credentials in config . Specifically it was telling me that I needed an IdentityPoolId . But I can't seem to find this IdentityPoolId in my AWS console. Where the heck do I get this from for my user pool? All I see is a Pool id and a Pool ARN. Relevant source

where can I find the secret key for the JWT from cognito

送分小仙女□ 提交于 2019-12-21 11:35:26
问题 I am trying out the log in function for the Cognito User Pool for my Web App. I was able to obtain the Token but I am not sure where to find the secret to decode it. I've read in one of the post that the secret is the secret Id for the App in the User Pool. However, for Javascript SDK, the secret id is blank. Does this mean my secret should also be blank? I tried this but I got a message that says "Error: PEM_read_bio_PUBKEY failed". 回答1: To correct the other answer: RS256 is an asymmetric

Where to find Identity Pool Id in Cognito

馋奶兔 提交于 2019-12-21 03:29:19
问题 Where is Identity Pool in Cognito Console. As said in docs it has format: IdentityPoolId An identity pool ID in the format REGION:GUID. But I see only Pool Id and Pool ARN in the console. Which has different format. 回答1: I can manage to get the IdentityPooId by aws cli: aws cognito-identity list-identity-pools --max-results 10 The command returns all of the Cognito identity pools registered for your account. { "IdentityPools": [ { "IdentityPoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd

When I try to login using AWS Cognito I get an AccessDeniedException about my custom Lambda trigger

倖福魔咒の 提交于 2019-12-20 11:34:17
问题 I am calling adminInitiateAuth and getting back a strange AccessDeniedException for my own lambdas. Here is the code I'm calling: var params = { AuthFlow: "ADMIN_NO_SRP_AUTH", ClientId: "@cognito_client_id@", UserPoolId: "@cognito_pool_id@", AuthParameters: { USERNAME : username, PASSWORD : tempPassword }, }; cognitoIdentityServiceProvider.adminInitiateAuth(params, function(error, data) { if (error) { console.log("ERROR! Login failed: " + JSON.stringify(error), error.stack); } else { console

AWS Cognito + google signup

若如初见. 提交于 2019-12-19 19:44:59
问题 I have try this below code and it's working fine. However I need to store these signup details within user pool (additionally I want add some custom attributes as well). But I didn't find a proper method to do this. function signinCallback(authResult) { AWS.config.region = 'us-XXXXXXX-1'; // Add the Google access token to the Cognito credentials login map. AWS.config.credentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId: 'us-XXXX-1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',

Using Cognito User Pools, without Cognito Federated Identities(identity pools)

喜夏-厌秋 提交于 2019-12-19 11:35:07
问题 I would like to use only Cognito User Pool, and therefore I want to use identity federation with Cognito User Pools, without Cognito Federated Identities (identity pools). I have followed the documentation, but I couldn't succeed. http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-social.html Her is my User Pool configuration. How can I combine Google and Cognito in User Pool without using identity pool (Federated Identities). Or is that possible? 回答1: Based on your

How to access user's email address in Cognito Federated Identities?

南楼画角 提交于 2019-12-18 03:56:45
问题 I'm trying to set up a basic website (serverless on AWS) that would allow visitors to login with Google and/or Facebook. Currently I'm planning to use S3, Cognito with Federated Identities, API Gateway, Lambda (NodeJS), with DynamoDB. The client app will be using Angular. I have the social login with Google and Facebook working, and currently I am inserting a row in a "users" table when a user logs in the first time that includes the cognitoId, name, profile picture URL, etc. I also figure it

AWS cognito: sign in with usernam/password OR facebook

血红的双手。 提交于 2019-12-17 18:58:34
问题 I want to integrate a pretty standard functionality: give option to user (mobile and web) to either login with email/password or with facebook (google) account with RBAC (different users may have different roles, like users, moderators, admins, creators, etc). Here is basically what I want from sign in: I went through a number of AWS tutorials and other materials. I got some grasp on how to implement it, but I still don't have a full picture. Hope someone can help me here. Here is my current