amazon-cognito

How do you authenticate a user in a user pool via Cognito when error messages say userName and password don't match even though they do?

扶醉桌前 提交于 2019-12-04 18:21:40
So I am messing around with Cognito and their Beta User Pools feature in Javascript. I am successfully creating users thanks to the documentation found here: http://docs.aws.amazon.com/cognito/latest/developerguide/using-amazon-cognito-user-identity-pools-javascript-examples.html When I try and authenticate the users though I get a strange error message saying: NotAuthorizedException: Incorrect username or password. I don't understand why this is the case as I am literally copying and pasting the values for userName and password that I used to create the user, which is working fine. Below is

Restrict login to Enterprise Google Domain for AWS Federated Identity Pool

喜你入骨 提交于 2019-12-04 16:24:42
I'm using a federation identity pools with aws-amplify ( https://aws.github.io/aws-amplify/media/authentication_guide#enabling-federated-identities ) and I'd like to restrict the scope of domains to just my google domain organization (ex. johndoe@foobar.com). There doesn't seem to be a way to lock it down on either the Google API console or the AWS Cognito Identity Pool settings, just a hint that an hd parameter can be appended to the google request to restrict it by domain (which would still require modifying the aws-amplify core package), and it still wouldn't be secure since anyone could

AWS User Pool, how to edit user attributes?

*爱你&永不变心* 提交于 2019-12-04 15:51:48
问题 I'm using the AWS Cognito User Pool and created there some users and now I like to change the attributes (e.g. name, address, ...) for a specific user. How it is possible to do this manually on the AWS Website? 回答1: The console does not have that capability but it can be done in the AWS Command Line Interface. aws cognito-idp admin-update-user-attributes \ --user-pool-id xxx \ --username yyy \ --user-attributes Name=xxx,Value=yyy Name=ttt,Value=sss ... Custom attributes use the following

Amazon Cognito Oauth2 with Spring Security

◇◆丶佛笑我妖孽 提交于 2019-12-04 11:48:43
问题 I'm trying to implement Spring Security in a resource server with "Cognito Oauth2", however I don't seem to find too much info. about it (or if It's even possible to do so). My nearest approach was using "Nimbus+JOSE" to check the validity of the "Access Token" with the "JWKS" and give permissions to acccess the resource. (Similar to the example they give with the "API Gateway Resource Protection Implementation" found here: https://aws.amazon.com/es/blogs/mobile/integrating-amazon-cognito

When does API Gateway validate revoked Cognito ID token

允我心安 提交于 2019-12-04 08:37:28
I am building a serverless react app which uses Cognito for sign-in/sign-out. The app calls API Gateway which is configured to use the Cognito User pool as the custom authorizer. I also build a lambda function to sign out a user ( cognitoIdentityServiceProvider.globalSignOut ). When I sign into the app, and then call the lambda function to perform an admin sign-out, calls to protected API gateway functions from the app are still valid (with Cognito ID token passed in Authorization header); Are admin calls such as cognitoIdentityServiceProvider.globalSignOut and cognitoIdentityServiceProvider

AWS Cognito, Lambda, User credentials in DynamoDB

試著忘記壹切 提交于 2019-12-04 08:01:10
I established a authentication flow with Facebook Login and AWS Cognito on the client site. Works fine. But now I need a reference of the user with its facebook id in a dynambodb table. Of course I could just call a AWS lambda function exposed via AWS API gateway, but how can I verify that the API call actually has a valid facebook id and that this facebook id matches the AWS Cognito Id. Maybe I am missing something here, I hope you guys can point me in the right direction ;) thanks! If you can key your ddb table by cognito id instead of facebook id, you can invoke api gateway with cognito

util.crypto.lib. randomBytes is not a function : aws cognito js throws error on authentication

浪子不回头ぞ 提交于 2019-12-04 07:12:54
I get the following error: TypeError: __WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__.util.crypto.lib. randomBytes is not a function when I try to authenticate the user using the following code I wrote: import { CognitoUserPool, CognitoUserAttribute, CognitoUser, AuthenticationDetails } from 'amazon-cognito-identity-js'; let authenticationDetails = new AuthenticationDetails({ Username: username, Password: password }); let userPool = new CognitoUserPool({ UserPoolId: 'us-east-1_1TXXXXXXbXX', ClientId: '4da8hrXXXXXXXXXXXXmj1' }); let cognitoUser = new CognitoUser({ Username: username, Pool:

AWS Cognito token types

余生长醉 提交于 2019-12-04 05:22:34
I'm trying to setup Cognito and I'm having trouble understanding the differences between the following three types of tokens: Token (returned by getOpenIdTokenForDeveloperIdentity ) SessionToken (returned by getCredentialsForIdentity ) SyncSessionToken (returned by listRecords ) In which way are these tokens related/different ? Here is a brief description of the 3 tokens that you talked about. I will try to link you to more detailed documentation where ever possible. Token : This is a OpendId Connect compliant id token issued by Cognito Identity which asserts the users identity in a signed and

How to use Amazon Cognito Logout endpoint?

偶尔善良 提交于 2019-12-04 05:10:11
I am using AWS Cognito in my application. While doing logout i am calling the Logout Endpoint . But after doing logout, I am still able to generate the id-tokens using the old refresh token. It means my logout endpoint is not working any more. I am saving the tokens in my local storage, And while doing the logout i am clearing the store manually. My Question is: How to properly use the logout mechanism of AWS Cognito? I'm not sure which framework you are using, but I'm using Angular. Unfortunately there are different ways of using AWS Cognito and the documentation is not clear. Here is my

Upload to Amazon S3 and Calling Amazon Cognito Identity from Rails server

一个人想着一个人 提交于 2019-12-04 04:42:49
问题 I am trying to follow the steps to upload files to Amazon S3 from an iOS app. According to the AWS iOS SDK docs, before uploading, it is required to authenticate the app users for secure access to AWS resources via my backend server: http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#providing-creds What is the right way to call the AWS Cognito Identity GetOpenIdTokenForDeveloperIdentity service from a rails (version 4.1) server? This service is not part of the aws