amazon-cognito

AWS Cognito completeNewPasswordChallenge calls onFailure method but the user is confirmed in AWS Console

血红的双手。 提交于 2019-12-05 14:18:24
I'm using AWS Cognito Javascript SDK in a react application. I have a user that was created in the AWS Console by an admin, and when the user is logged in for the first time they have to reset their password. I go through the newPasswordRequired flow, and when I call the completeNewPasswordChallenge function with the parameters, the onFailure callback is ran. When I log the error I get, {code: "UnknownError", message: "Unknown error"} . However, when I check the AWS Console, the user in the user pool is changed from FORCE_CHANGE_PASSWORD to CONFIRMED. My code is: class LoginScreenContainer

User Migration to Cognito using Lambda trigger in python

杀马特。学长 韩版系。学妹 提交于 2019-12-05 14:13:36
I've created a Lambda function in Python to migrate users from RDS to AWS Cognito. The problem I am facing is the return type for my function in order for Cognito to create the user. At first I was returning JSON: return { "response": { "userAttributes": { "email": event["userName"], }, "finalUserStatus": "CONFIRMED", "messageAction": "SUPPRESS", "desiredDeliveryMediums": "EMAIL", "forceAliasCreation": "false" } } Which resulted in an exception: I also tried to follow the only code Sample (Page 109) they presented about migrating users via Lambda: exports.handler = function (event, context) {

AWS : Invalid identity pool configuration. Check assigned IAM roles for this pool

情到浓时终转凉″ 提交于 2019-12-05 11:20:20
问题 I have created one user pool & identity pool. I have used javascript sdk. I am able to signup, send confirmation code & confirm user successfully with javascript sdk. But when i try to sign in user with authenticate method & try to get credentials with "CognitoIdentityCredentials" by passing idToken with below code logins[cognitoEndpoint + "/" + userPoolId] = jwtToken; AWS.config.credentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId: identityPoolId, Logins: logins }); it's giving

AWS Cognito adminCreateUser from Lambda

隐身守侯 提交于 2019-12-05 09:44:47
I'm trying to create a user in a AWS User Pool from an AWS Lambda I tried with this script took from what seems to be the official JavascriptSDK for the AWS but can't get it working. http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminCreateUser-property I keep getting this error: TypeError: cognitoidentityserviceprovider.adminCreateUser is not a function 'use strict' const AWS= require('aws-sdk'); exports.handler = (event, context, callback) => { var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({apiVersion: '2016-04-18'});

How to check for custom OpenID claim in an IAM role's trust policy?

孤街浪徒 提交于 2019-12-05 09:27:30
I am authenticating users with auth0 to receive a id token containing the following claim "http://myapp.com/scope": "write" Using a Cognito identity pool with an OpenID authentication provider (namely, auth0), I am able to successfully get temporary credentials to access aws services. However, I want to restrict access to these services based on my custom claim above. I believe the proper way to do this is by editing the trust policy associated with my identity pool, but I am not sure how to add a condition to check for the above claim in my trust policy. The current default trust policy is {

Authenticate app to AWS API Gateway with Cognito

℡╲_俬逩灬. 提交于 2019-12-05 06:19:05
问题 Following is my use case - I am developing an android app. I am trying to use aws api gateway and a lambda function at back of it. but even before i login i want to secure the HTTP calls and authenticate my application. For that i am planning to use cognito with the API Gateway. so first my call will go to cognito which will authenticate the application(not user) and then my call will go to any Lamda function. I want to include all of this in the SDK of api gateway. Ques 1 - Is it even

Is it safe to show the AWS cognito pool ID in my html?

十年热恋 提交于 2019-12-05 03:31:21
I am building a serverless website with AWS Cognito, Lambda, S3 and a dozen more of their services. My HTML/JS in my login page has the cognito pool ID. How safe is this? I know that it is best practise to hide sensitive stuff. But this is not client-server. Its all client if im honest. I do access some sensitive data via a lambda call. But even this call requires some plain-text sensitive inputs like the user ID. <script src="https://sdk.amazonaws.com/js/aws-sdk-2.3.7.min.js"> </script> <script> AWS.config.region = 'XX-XXXX-1'; AWS.config.credentials = new AWS.CognitoIdentityCredentials({

How can I get the Amazon Cognito Identity SDK working in Aurelia?

牧云@^-^@ 提交于 2019-12-05 02:59:38
I am trying to get the Amazon Cognito Identity SDK working in Aurelia. I do not have a lot of Javascript experience and am very unfamiliar with the various dependency systems. I installed the Cognito SDK using: npm install --save amazon-cognito-identity-js I then edited my aurelia_project/aurelia.json file as suggested in the Aurelia documentation to include a new client library dependency in build.bundles vendor-bundle dependencies: "sjcl", "jsbn", { "name": "aws-sdk", "path": "../node_modules/aws-sdk/", "main": "dist/aws-sdk" }, { "name": "amazon-cognito-identity-js", "path": "../node

How to validate AWS Cognito JWT in .NET Core Web API using .AddJwtBearer()

China☆狼群 提交于 2019-12-05 01:49:10
问题 I was having some trouble figuring out how to go about validating a JWT given to the client by AWS Cognito inside my .NET Core Web API. Not only could I not figure out what the variables for Microsoft.IdentityModel.Tokens.TokenValidationParameters were supposed to be, but once I finally did, I didn't know how to retrieve the JWT key set from https://cognito-idp.{region}.amazonaws.com/{pool ID}/.well-known/jwks.json Finally, though a lot of random Googling and trial and error, I found a

Example for Authenticating using AWS Cognito (boto3)

人盡茶涼 提交于 2019-12-04 19:29:40
问题 I am trying AWS Cognito using boto3. I find it difficult to understand by reading the AWS documentation. I am looking for an example or tutorial which has a step-by-step explanation. I already have a facebook app and Cognito identity pool created. Something like backspace Cognito tutorial for node.js 回答1: I found couple of examples for integrating with Cognito using boto3. Amazon AWS Cognito and Python Boto3 to establish AWS connection and upload file to Bucket https://forums.aws.amazon.com