Comments (6)
Can you confirm you redeployed your API after you reset the CORS configuration? Unfortunately I could not replicate the problem.
from aws-cognito-apigw-angular-auth.
Actually taking another look, this is not a CORS error. It's related to permissions, I suggest to enable logging in APIGW to understand the issue. Can you double check the Auth IAM role cognito is using has access to the /google path?
from aws-cognito-apigw-angular-auth.
IAM role cognito is using has access to goolge path. I tried to to enable cloudwatch in APIGW but it keeps failing with error " The role ARN does not have required permissions set to API Gateway". This happens when I try to add the ARN of the following role to the APIGW under setting. Below are the my role and policy details. What am I missing?
- Attached "AmazonAPIGatewayPushToCloudWatchLogs" policy under managed policies of the role under permissions tab.
- In policy on the same tab has the following text:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"execute-api:Invoke",
"logs:"
],
"Resource": [
"arn:aws:execute-api:ap-south-1:xxxxx//GET/google",
"arn:aws:execute-api:ap-south-1:xxxxx//POST/google",
"arn:aws:logs:::"
],
"Effect": "Allow"
}
]
} - And the trust policy under trust relationships tab has the following text
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "apigateway.amazonaws.com",
"Federated": "cognito-identity.amazonaws.com"
},
"Action": [
"sts:AssumeRoleWithWebIdentity",
"sts:AssumeRole"
],
"Condition": {
"StringEquals": {
"cognito-identity.amazonaws.com:aud": "ap-south-1:xxxxxx"
},
"ForAnyValue:StringLike": {
"cognito-identity.amazonaws.com:amr": "authenticated"
}
}
}
]
}
Could you please assist? Thanks
from aws-cognito-apigw-angular-auth.
Unfortunately I still cannot replicate, I was presenting on the AWS Dev Day in Melbourne yesterday and confirmed with some other developers it worked fine in their own account.
Might be a problem with permissions when the stack was created. Can you confirm it still happens if you delete the stack and create a new one following the instructions? Does the user running the cloudformation commands has permissions to create all resources?
Can you also confirm you performed the steps 5 to 7 from the README file and added the Google app ID to the Cognito Identity Pool?
from aws-cognito-apigw-angular-auth.
Also create a separate role for the API Gateway logs, here are some instructions https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cloudwatch-logs/ and http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html#how-to-stage-settings-console (Item 6)
from aws-cognito-apigw-angular-auth.
Closing this one as I was not able to reproduce
from aws-cognito-apigw-angular-auth.
Related Issues (20)
- Async call after Google authentication HOT 3
- Facebook login HOT 2
- MissingAuthenticationTokenException HOT 1
- IAM Capability Required HOT 2
- Cannot read property 'config' of null HOT 1
- Cannot read property 'config' of null HOT 3
- Security Issue on Posting user attributes HOT 1
- How to deploy aws-cognito-apigw-angular project to a server HOT 2
- CUPGroupRole not well named HOT 1
- React + Graphql example? HOT 1
- UI is not working for JWT and IAM HOT 1
- Updating Readme Step2 HOT 1
- Updating Readme step 2 (need aws configure) HOT 2
- sam.yaml cannot be deployed: nodejs version too old HOT 1
- it is old angualr version , not able run please update the new version
- lambda.zip requires modules
- Instructions not clear HOT 2
- aws cloudformation deploy error HOT 1
- Authenticated Role Selection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-cognito-apigw-angular-auth.