amazon-cognito

How to pass Cognito token to Amazon API Gateway?

爱⌒轻易说出口 提交于 2019-11-29 03:56:16
I'm developing web app based on Amazon API Gateway. Now I created Facebook login and successfully logged into website. but when I call another API, everything gone. I think I should pass Cognito token when call API everytime. am I right? if yes, how to pass Cognito token to API? like header? or another way? Thanks, You are using the "Basic Authflow" from cognito identity, which means you will need to get credentials for your users by calling STS's "AssumeRoleWithWebIdentity". Here is some documentation to help: http://docs.aws.amazon.com/cognito/devguide/identity/concepts/authentication-flow/

How to get the Cognito Identity id in AWS Lambda

蹲街弑〆低调 提交于 2019-11-29 02:39:35
问题 How can I get the identity id of the user (logged in by AWS Cognito) that invoked an AWS Lambda function? Do I have to use the SDK on the Lambda function to get the identity id? 回答1: Per the docs, it looks like information about the identity provider would only be available for an invoke through the Mobile SDK. To get around this, one option is to pass the identity ID to the function manually as part of the event. Assuming you are doing something like AWS.config.credentials = new AWS

How do I access the group for a Cognito User account?

人盡茶涼 提交于 2019-11-29 02:36:54
问题 In AWS Cognito, you can add a user to a group (after first creating a group). A user may belong to one or more groups. With using the JavaScipt SDK (https://github.com/aws/amazon-cognito-identity-js), is there a way to read the assigned Groups? Would aws-sdk provide access over amazon-cognito-identity-js ? 回答1: If you just need the Cognito UserPools Groups the Authenticated User is a member of, instead of making a separate API call, that data is encoded in the idToken.jwtToken that you

Using an api key in amazon api gateway

我是研究僧i 提交于 2019-11-29 02:06:56
问题 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"? 回答1: The x-api-key parameter is passed as a HTTP header parameter (i.e. it is not added to the JSON body). How you pass HTTP headers depend on the HTTP client you use. For example, if you use curl and assuming that you POST the JSON payload, a request would look

AWS Cognito Error: 'identityPoolId' failed to satisfy constraint

安稳与你 提交于 2019-11-28 22:29:59
I am new Cognito. I am trying to implement AWS Cognito using Lambda. This is the tutorial I am following. AmazonCognitoIdentityClient client = new AmazonCognitoIdentityClient(); GetOpenIdTokenForDeveloperIdentityRequest tokenRequest = new GetOpenIdTokenForDeveloperIdentityRequest(); tokenRequest.setIdentityPoolId("us-east-1_XXXXXXX"); This is the pool Id that I am using in the setIdentityPoolId This is the JUnit test public class AuthenticateUser implements RequestHandler<Object, Object> { @Override public Object handleRequest(Object input, Context context) { AuthenticateUserResponse

How to authenticate API Gateway calls with Facebook?

南笙酒味 提交于 2019-11-28 21:37:39
Problem: I want to authorize my Amazon API Gateway hosted REST API users using Facebook Authentication. My Understanding: I know Amazon Cognito can be used to authenticate users, calling as Federated Identities. Then, I saw Authenticate API Clients with Amazon Cognito Your User Pool , which authenticates for Cognito User Pool. I also found Use Amazon API Gateway Custom Authorizers , to use from custom authorization. But, I did not find to link API Gateway to authenticate using Cognito Federated Identities (i.e. Facebook here). Can we use same procedure as User Pool for Federated Identities as

AWS Cognito User Pool without a password

旧城冷巷雨未停 提交于 2019-11-28 20:40:03
I want to use a phone number as the username for my app and i want to be able to make it simple to sign up by just having to verify the phone number each time they want to login - no messy password remembering business. How to do this with AWS Cognito User Pool as its asking me to mandatorily configure a password for each user. I thought of using a dummy password for each user and configure mandatory user verification. Everytime the user sign out i can "Unverify" the user so that next time they would automatically be asked to verify the phone number. Also i would wire up my app to only "login"

API Gateway authentication with Cognito Federated Identities

半世苍凉 提交于 2019-11-28 19:52:44
I want to use Cognito Federated Entity (allowing signin through Google etc), to allow access to API Gateway for a web javascript application. I managed to get the Cognito's sessionToken through signing-in with Google but I'm stuck on the API Gateway configuration for enabling the session token. Is there a good tutorial for this entire Federated Entity authentication workflow? Thanks! Since you want to invoke APIs via authenticated Cognito identity, first Amend the auth role of the identitypool to have api execute policy, you could just attach the managed policy

AMAZON AWS How do i subscribe an endpoint to SNS topic?

耗尽温柔 提交于 2019-11-28 18:54:05
I'm implementing push notifications in an iOS app using Amazon SNS and Amazon Cognito services. Cognito saves tokens successfully, my app gets notified, everything's working well, but there is a thing. Now, when still in development, I need to manually add endpoints to an SNS topic, so all subscribers can get notifications. When i'll push an update to the App Store, there will be thousands of tokens to add. I was studying Amazon AWS documentation, but there was no clue whether it's possible to make it happen without that additional effort. My question: is it possible to automatically subscribe

AWS Cognito User Pools in iOS (Swift) app

让人想犯罪 __ 提交于 2019-11-28 17:54:51
问题 I'm trying to implement the new AWS Cognito User Pools in my iOS (Swift) app, but I'm struggling to get the sign in process to work. I am essentially trying to follow the example available here. This is what I have so far: AppDelegate: class AppDelegate: UIResponder, UIApplicationDelegate, AWSCognitoIdentityInteractiveAuthenticationDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let serviceConfiguration =