diff --git a/README.md b/README.md index 41acfb2..2824579 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,17 @@ CloudFormation will automatically create and configure the following resources i * Lambda Function * DynamoDB Table -3. Generate a Google API ID following the instructions on http://docs.aws.amazon.com/cognito/latest/developerguide/google.html +After the stack completes, the following command will show you the Outputs: + +``` +aws cloudformation describe-stacks --query 'Stacks[0].[Outputs[].[OutputKey,OutputValue]]|[]' --output text --stack-name CognitoAPIGWDemo +``` + +3. Generate a Google API ID following the instructions on http://docs.aws.amazon.com/cognito/latest/developerguide/google.html 4. Go to the CloudFormation console, select the stack created on item 2 and open the OUTPUTS tab. All resources we'll need will be there. Use the information to fill up the details under RESOURCE IDENTIFIERS of the file "src/aws.service.ts" including the region. -5. Go to the Cognito Console, select the Identity Pool created by CloudFormation and click on EDIT IDENTITY POOL. +5. Go to the Cognito Console, select the Identity Pool created by CloudFormation and click on EDIT IDENTITY POOL. 6. Go to the AUTENTICATION PROVIDERS section, select the tab GOOGLE+, click on the UNLOCK button and add the details on the Google API ID generated on step 4. Save the changes. @@ -79,7 +85,7 @@ unzip apigwsdk.zip 12. From the new folder "aws-cognito-apigw-angular" execute the following commands in a terminal: ``` -npm install +npm install npm start ``` diff --git a/package.json b/package.json index 8ed43c5..51f0f5d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "private": true, "dependencies": { "@angular/animations": "^4.0.2", + "@angular/cdk": "^2.0.0-beta.8", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8312132..5e2666a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -34,7 +34,7 @@ export class AppComponent { constructor(public awsService:AwsService){ } - + setToken(token){ this.token=token; localStorage.setItem("token", token); @@ -98,8 +98,8 @@ export class AppComponent { userDataFromUserPools(){ this.awsService.postInfoApiUserPools(this.token) .subscribe(user => { - //this.user = user; - //console.log(user); + // for authorizer test in APIGW Console + console.log(user); console.log("POST with JWT to API Gateway"); }, error => this.errorMessage = error); @@ -177,7 +177,7 @@ export class AppComponent { } this.provider = "Google"; this.googleConfirmed = "confirmed"; - } + } } googleCallbackWithData(data: any){