amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 302 forks source link

Refactor typescript bindings #76

Closed dpantke closed 7 years ago

dpantke commented 7 years ago

This a relatively moderate refactor to make the example more "Angular-esque" by switching from the JS libraries to using the Typescript bindings for both the AWS SDK and the Cognito Identity SDK. This resulted in some workarounds to deal with circular dependencies ( which will be taken care of with some further refactoring ) and the disabling of the Mobile Analytics client for now.

dpantke commented 7 years ago

https://github.com/dpantke/aws-cognito-angular2-quickstart/tree/refactor-typescript-bindings

Looked at https://github.com/dpantke/aws-cognito-angular2-quickstart/blob/refactor-typescript-bindings/src/app/service/cognito.service.ts , it appears to have the changes I made.

vbudilov commented 7 years ago

Hi @dpantke , a lot of the functionality doesn't work anymore...for starters, I get the below exception when logging in. I'm going to deny this request since there are a lot of errors here.

core.es5.js:1085 ERROR Error: Cannot read property 'identityId' of undefined at GetParametersCallback.webpackJsonp.163.GetParametersCallback.callbackWithParam (myprofile.component.ts:55) at cognito.service.ts:388 at Response. (CognitoUser.js:760) at Request. (request.js:364) at Request.callListeners (sequential_executor.js:105) at Request.emit (sequential_executor.js:77) at Request.emit (request.js:682) at Request.transition (request.js:22) at AcceptorStateMachine.runTo (state_machine.js:14) at state_machine.js:26 at Request. (request.js:38) at Request. (request.js:684) at Request.callListeners (sequential_executor.js:115) at Request.emit (sequential_executor.js:77) at Request.emit (request.js:682)