Questions tagged [amazon-cognito]

Amazon Cognito is a simple user identity and data synchronization service that helps securely manage and synchronize mobile app data.

Amazon Cognito lets you add user sign-up, sign-in, and access control to your web and mobile apps quickly and easily. Amazon Cognito scales to millions of users and supports sign-in with social identity providers, such as Apple, Facebook, Google, and Amazon, and enterprise identity providers via SAML 2.0 and OpenID Connect.

Work Offline

You can use the optional Amazon Cognito client SDKs to automatically create a local data store to cache user app data on the device. This means your app can keep reading and writing data regardless of the device connectivity state.

Store and Sync across Devices

With Amazon Cognito you can easily synchronize app data across all of an end user’s devices. Amazon Cognito manages the complexity of conflict resolution and intermittent network connectivity so that your app can always deliver a great user experience.

Control Access to AWS Resources

You can use the unique user identifiers that Amazon Cognito generates in your access policies to enable or restrict access to other AWS resources on a per-user basis.

Safeguard AWS Credentials

When you use Amazon Cognito, the service takes care of all the steps necessary to create a unique identifier for your app’s users and retrieve temporary, limited privilege AWS credentials.

Interaction with other Amazon services AWS Cognito can interoperate with AWS SES, AWS SNS, AWS Lambda, and more.

http://aws.amazon.com/cognito/

7147 questions
201
votes
14 answers

How to change User Status FORCE_CHANGE_PASSWORD?

Using AWS Cognito, I want to create dummy users for testing purposes. I then use the AWS Console to create such user, but the user has its status set to FORCE_CHANGE_PASSWORD. With that value, this user cannot be authenticated. Is there a way to…
Dominique Vial
  • 3,729
  • 2
  • 25
  • 45
186
votes
22 answers

Unable to verify secret hash for client in Amazon Cognito Userpools

I am stuck at "Amazon Cognito Identity user pools" process. I tried all possible codes for authenticating user in cognito userpools. But I always get error saying "Error: Unable to verify secret hash for client 4b*******fd". Here is…
Ronak Patel
  • 3,324
  • 4
  • 21
  • 31
121
votes
12 answers

Using an API key in Amazon API Gateway

I have created an API Key and added it to my functions. I have then deployed the api and tested it but still get: "message": "Forbidden" How do I pass the api key with my JSON request as I have been using "x-api-key": "theKey"?
cdub
  • 24,555
  • 57
  • 174
  • 303
109
votes
11 answers

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

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…
EagleBeak
  • 6,939
  • 8
  • 31
  • 47
84
votes
7 answers

How to modify expiry time of the access and identity tokens for AWS Cognito User Pools

I can't find any documentation which explains if and how to modify the expiry time of access and identity tokens for AWS Cognito User Pools. The documentation specifies that by default expires 1h after the emission. Is there a way to modify the…
Luca
  • 1,159
  • 2
  • 10
  • 18
76
votes
9 answers

Amazon Cognito "A client attempted to write unauthorized attribute"

I'm using the JavaScript SDK for AWS Cognito, and there are a couple of custom attributes that I just can't seem to save to and can't see why. The problem attributes are mutable string fields as follows: custom: role custom: recruitingrole custom:…
Duke Dougal
  • 24,359
  • 31
  • 91
  • 123
76
votes
3 answers

How to edit user attributes in AWS Cognito User Pool for specific user?

I'm using AWS Cognito User Pool and have created some users. Now I would like to change some of the attributes for a specific user such as name, address, etc... Is it possible to do this on an AWS Website? If so, how?
MichaD
  • 975
  • 2
  • 7
  • 13
76
votes
8 answers

Cognito User Pool: How to refresh Access Token using Refresh Token

I am using Cognito user pool to authenticate users in my system. A successful authentication gives an ID Token (JWT), Access Token (JWT) and a Refresh Token. The documentation here, clearly mentions that the refresh token can be used to refresh…
Hardik Shah
  • 916
  • 1
  • 7
  • 13
71
votes
10 answers

How to get user attributes (username, email, etc.) using cognito identity id

I have AWS Cognito Identity Pool that is configured with Cognito User Pool as an authentication provider. Assume I have identity ID of an identity in Cognito Identity Pool (e.g. us-east-1:XXaXcXXa-XXXX-XXXX-XXX-XXXXXXXXXXXX) where this identity has…
gehad
  • 1,205
  • 3
  • 12
  • 17
68
votes
3 answers

Cognito hosted UI

I have been looking into setting up a login for a web app that lets clients view data hosted in S3 and found that AWS Cognito has a hosted web UI [link] that handles most of the authentication flow for me, the issue I am facing is I cannot find out…
Fyreye
  • 683
  • 1
  • 5
  • 8
68
votes
6 answers

Firebase authentication vs AWS Cognito

We are building a mobile and web app on AWS using API Gateway and Lambda and are currently evaluating if we should use AWS Cognito or Firebase Auth. AWS Cognito integrates nicely into API Gateway and Lamdba e.g. only authenticated users can execute…
61
votes
5 answers

AWS Cognito: Best practice to handle same user (with same email address) signing in from different identity providers (Google, Facebook)

When signing in a user with the same email address through the Google and Facebook identity providers, AWS Cognito creates multiple entries in the user pool, one entry per identity provider used: I have used the example code provided in this…
60
votes
8 answers

How to use the code returned from Cognito to get AWS credentials?

Right now, I'm struggling to understand AWS Cognito so maybe someone could help me out. I set a domain to serve Cognito's hosted UI for my User Pool like what's described here. So when I go to…
arjabbar
  • 6,044
  • 4
  • 30
  • 46
58
votes
7 answers

AWS Cognito Authentication USER_PASSWORD_AUTH flow not enabled for this client

I have an mobile app with user pool (username & password). The app works fine with aws-amplify sdk. But, wanted to move the code out to Lambdas. So, I have written the following Lambda using Boto3. Here is Lambda: import boto3 def…
user9374347
  • 1,631
  • 2
  • 8
  • 8
58
votes
9 answers

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

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…
1
2 3
99 100