amazon-cognito

AWS Cognito user pool identity REST examples

混江龙づ霸主 提交于 2019-12-03 07:23:28
We are looking into using user pools for our application. I would like to try out API in REST manner. Documentation at https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/Welcome.html doesn't have request and response examples like others. Looking for SignUp, ResendConfirmationCode,ChangePassword and ConfirmSignUp examples. Currently it is not in Cognito user pools documentation, but following example should work for SignUp. Similarly you can formulate it for other APIs. Payload should be what has been mentioned in the documentation you pointed CONTENT-TYPE: application

How to combine Cognito User Pools with external providers like Facebook?

一个人想着一个人 提交于 2019-12-03 06:09:45
So far Cognito has identity pools that support external providers like Facebook. Now there is Cognito User Pools - which I would love to use. But I can't figure out how to support both - Cognito User Pools and external providers like Facebook. It seems Identity Pools and User Pools are separated things and I can't see how to put them together. So in short, I want my users to be able to either sign in with Facebook or User Pools. Anybody has any idea if it is even possible? You can add your Cognito User Pool as an Identity Provider in your Cognito Federated Identity Pool. Steps: (1) Create your

Cognito auth flow fails with “Already found an entry for username Facebook_10155611263153532”

痴心易碎 提交于 2019-12-03 06:00:39
The goal is to implement a social provider auth flow as described in User Pools App Integration and Federation . One important thing that I want to satisfy, is to merge user pool accounts that have the same email address. I am accomplishing that by calling adminLinkProviderForUser within the PreSignUp_ExternalProvider cognito lambda trigger. So with this, everything works. The new social provided user is being registered and linked with the already existing Cognito (user+pass) user. However, the authentication flow, from user's perspective doesn't complete. It fails at the last step where the

How to allow my user to reset their password on Cognito User Pools?

爱⌒轻易说出口 提交于 2019-12-03 04:36:49
So in my app I obviously want to provide the means for users to reset their passwords. The issue I'm having though is that the new documentation for User Pools is pretty ambiguous on this topic. Here is what they tell you to do for a Forgot Password flow, and the link you may find it at: cognitoUser.forgotPassword({ onSuccess: function (result) { console.log('call result: ' + result); }, onFailure: function(err) { alert(err); }, inputVerificationCode() { var verificationCode = prompt('Please input verification code ' ,''); var newPassword = prompt('Enter new password ' ,''); cognitoUser

How to use AWS IoT to send/receive messages to/from Web Browser

心不动则不痛 提交于 2019-12-03 02:18:03
问题 We are trying to use Amazon Web Services Internet of Things (AWS IoT) to send messages from/to a Web Browser (e.g: . Given that the AWS IoT supports JavaScript we expect that this is possible ... We have searched at the AWS IoT Documentation but only found server-side examples (which expose AWS secrets/keys...) Are there any good working examples or tutorials for using AWS IoT to send/receive messages via WebSockets/MQTT in the browser (e.g: authenticating with AWS Cognito) ? Thanks! 回答1:

AWS cognito: What's the difference between Access and Identity tokens?

我怕爱的太早我们不能终老 提交于 2019-12-03 02:13:15
Just reading the docs , they seem very similar to me so I can't really discern why to use one over the other. Although identity token seems better since it has custom attributes on it from the user pool (eg: custom:blah and the default ones like name and email ). Right now, I am working with an app that passes the access token back down to the browser so it can use it for making ajax REST calls (there is an auth filter that expects this access token and validates it). Could I just switch out the access token with the id token? The current validation logic is to just get the sub field (the uuid

Can I specify an AWS DynamoDB policy based on Cognito ID?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 01:13:49
问题 Can I apply a policy to an AWS DynamoDB table but restrict it based on the Cognito ID of the user accessing it? E.g. A Customer table has a primary hash key equal to the Cognito ID. When anyone but the user sharing the same ID tries to get the item they will receive an unauthorised exception. (Non DynanoDB policies are probably also valid.) 回答1: You should be able to do something like this using the same techniques as those for using an ID Provider. You should use the Cognito identifier as

How to verify JWT from AWS Cognito in the API backend?

独自空忆成欢 提交于 2019-12-03 00:35:40
问题 I'm building a system consisting of an Angular2 single page app and a REST API running on ECS. The API runs on .Net/Nancy, but that might well change. I would like to give Cognito a try and this is how I imagined the authentication workflow: SPA signs in user and receives a JWT SPA sends JWT to REST API with every request REST API verfies that the JWT is authentic My question is about step 3. How can my server (or rather: my stateless, auto-scaled, load-balanced Docker containers) verify that

Firebase authentication vs AWS Cognito

心不动则不痛 提交于 2019-12-03 00:18:41
问题 We are building a mobile and web app on AWS using API Gateway and Lambda and are currently evaluating if we should use all the AWS Mobile Servcies (Cognito, Analytics, Mobile Hub, etc) or if we should use Firebase instead (which offers some advantages like remote config). I think using the non-funtional part of firebase like Analytics, Remote Config, Crash Reports, Notification should be fine with the AWS backend. The part were I am not certain is the Authentication Layer. AWS Cognito

How to handle with token expiration on Cognito

允我心安 提交于 2019-12-02 23:44:59
I am developing an application that uses AWS Cognito as the Identity Provider. So the user authenticate on AWS Cognito Pool and get the Access Token, Access ID and Refresh token. Then the user can make backend requests to my app. I get the Access Token validate it, get the user profile on Cognito AWS and authorize the request. The problem is that after the Access token has expired, and the client send the expired token to the backend, the backend app get an error (token experied or not authorized). How can I make this workflow works? I was thinking in send to the client a message that the