07-13-2016 06:09 - edited 07-13-2016 07:03
07-13-2016 06:09 - edited 07-13-2016 07:03
Hi,
I've been writing a web app as a project to learn some Node.JS, Angular.JS and AWS Lambda, S3 and Dynamo.
I have a functioning app which tracks a user's Fitbit badges, nothing flashy, but I've done what I set out to do 🙂 however I have cheated in the sense that I have included the access and secret access keys associated with the IAM role which invokes the Lambda funciton within the client side app.js - whilst the IAM role only has permissions to invoke the specific Lambda function in question, this is not ideal.
What I was hoping to be able to do was use AWS Cognito and get Cognito to validate the Fitbit access token issued to a user before executing the Lambda function. I've gone through the Cognito setup but can't seem to get it working. Cognito supports OpenID and SAML - In my naiveté I thought that OAuth2.0 was part of OpenID and it would work, but it seems not.
Has anyone worked on this kind of integration or know if there is a way on integrating Cognito?
Thanks