aws-cognito

Google Authentication fails with AWS Cognito Identity Pool on Android

牧云@^-^@ 提交于 2019-12-13 17:51:31
问题 I get an NotAuthorizedException:Token is not from a supported provider of this identity pool when I call Amazon.CognitoIdentity.AmazonCognitoIdentityClient.GetIdAsync() I do not understand why, the token was obtained by authenticating with GoogleSignInApi , and the AWS Identity Pool is configured to federate to the Google authentication provider with the same "Google WebApp Client ID" used to authenticate on the Android device. Also I've tried to obtain the Google token using 2 different ways

Is it safe to authenticate a Cognito User through API Gateway to Lambda using a custom property?

微笑、不失礼 提交于 2019-12-13 06:59:46
问题 I'm currently using a Cognito User Pool as an authorizer for an API Gateway endpoint, through to a Lambda function. Can I pass the Integrated Request on to Lambda and SECURELY allow or deny from inside Lambda based on a custom attribute? Mapping: "administrator" : "$context.authorizer.claims['custom:administrator']", Lambda handler: boolean isAdmin = Boolean.parseBoolean(request.getContext().get("administrator")); if(isAdmin) etc... To be clear, a user that is NOT an administrator should not

Angular + amazon-cognito-identity-js, why am I getting error: global is not defined

感情迁移 提交于 2019-12-13 01:43:54
问题 From a command line: ng new sandbox cd .\sandbox\ ng serve Open http://localhost:4200/. It works. npm install --save amazon-cognito-identity-js Inside \src\app\sign-up\sign-up.component.ts add this line of code: import * as AmazonCognitoIdentity from 'amazon-cognito-identity-js'; Add a constructor: constructor() { new AmazonCognitoIdentity.CognitoUserPool({}); } Refresh http://localhost:4200/. Page is blank. There is a console error: Uncaught ReferenceError: global is not defined at Object..

AWS API Gateway - using Access Token with Cognito User Pool authorizer?

时光怂恿深爱的人放手 提交于 2019-12-12 08:06:55
问题 I am configuring an app with various frontends (mobile and web apps) and a single API backend, powered by Lambda and accessed via AWS API Gateway. As I'm planning to use Cognito to authenticate and authorize users, I have set up a Cognito User Pool authorizer on my API Gateway and several API methods. With an architecture like this, it seems logical that my apps (e.g. an iOS or Vue.js app) are the Client applications from an OAuth perspective, and my API Gateway backend is a Resource Server.

AWS Cognito Identity JS: Forget/Remember/Do Not Remember Device

∥☆過路亽.° 提交于 2019-12-12 05:19:03
问题 I'm working with the AWS Cognito Identity JS SDK (https://github.com/aws/amazon-cognito-identity-js) and I'm trying to set up a few buttons to test the setDeviceStatusRemembered , setDeviceStatusNotRemembered , and forgetDevice functionality but I keep getting an error saying: MissingRequiredParameter: Missing required key 'DeviceKey' in params Here is an implementation of one of the functions: forgetDevice = function(){ var cognitoUser = userPool.getCurrentUser(); if (cognitoUser != null) {

Swift DynamoDB Mapper Sending Empty Values

主宰稳场 提交于 2019-12-12 04:24:11
问题 I'm trying to use DynamoDB using the iOS Swift SDK. I'm using Cognito with Facebook as an external identity provider. Cognito is working fine - I've tested user sync and it works OK, so I believe I have the authentication set up. Here's how I'm setting up the SDK (I have the actual values of my identity pool in my code): let credentialsProvider = AWSCognitoCredentialsProvider(regionType:.USEast1, identityPoolId:"<my-identity-pool-id>", identityProviderManager: FacebookProvider()) let

Login with Facebook using Cognito is redirecting to URL with an error

橙三吉。 提交于 2019-12-11 16:42:37
问题 I've created a User Poll and connected a Facebook to it. Here is what it looks like in the AWS Console. I also have set email as a required attribute for signing up. However, when I visit my hosted login page and click Continue with Facebook , I get redirected back to my page with URL http://localhost:4200/#error_description=attributes%20required:%20[email]&error=invalid_request Why is this happening? I've followed all the instructions, and have included email as a scope. I am expecting an

Attributes mapping in cognito user pool from fb/Google.

喜欢而已 提交于 2019-12-11 15:59:07
问题 There's new feature in aws cognito to allow user to sign in through external federation identity providers in user pool. I followed the steps given the aws Doc. 1) select identity providers 2) attributes mapping But when I sign up, fb/ Google account ID don't get map in user pool. Can someone give me a proper code to do this. I mean how should I map fb/ Google user sign in programmatically in cognito user pool. 回答1: Currently, only the Facebook id, Google sub, and Login with Amazon user_id

AWS Cognito How to add user to user pool on sign up using federated identities?

久未见 提交于 2019-12-11 08:29:35
问题 I want to authenticate user using AWS Cognito. If user authenticated by username and password then I can identify him using AWS session, I can logout him using AWS. But if user authenticated using facebook or google then he does not get into user pool. First, I should initialize user in facebook and google, then I can get credentials from AWS using tokens from facebook and google. Logout button should execute logout function from facebook and google SDK. I want to add user to user pool when

Cognito with DynamoDB - connecting to us-east-1 instead eu-central-1

坚强是说给别人听的谎言 提交于 2019-12-11 07:34:43
问题 I'm using AWS DynamoDB with Cognito to authorize access (unauthorized user so far) from Android. My db is in eu-central-1 and I use com.amazonaws:aws-android-sdk-ddb:2.2.8 , as: CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(context, "eu-central-1:XXX", Regions.EU_CENTRAL_1 ); AmazonDynamoDBClient ddbClient = new AmazonDynamoDBClient(credentialsProvider); final DynamoDBMapper mapper = new DynamoDBMapper(ddbClient); In logs I see: