sst / guide

Repo for guide.sst.dev
https://guide.sst.dev
MIT License
3.68k stars 443 forks source link

Authorize Lambda to access api with cognito and get token #269

Open KrifaYounes opened 6 years ago

KrifaYounes commented 6 years ago

I have a react-js lambda who expose an API Gateway My lambda need to access to an API with AWS-COGNITO without login/password I search a way to generate the TOKEN and to access to the TOKEN generated on my react-js Lambda Someone have an idea ?

jayair commented 6 years ago

@KrifaYounes Which token are you talking about? Can you post a link to any docs for the token you are referring to?

KrifaYounes commented 6 years ago

I want to generate a Authorization token from my lambda with cognito and I need to propagate the authorization token to a other java API

img_1936

jayair commented 6 years ago

@KrifaYounes Thanks for the details. Are you able to get the authorization token from the Cognito Pool?

KrifaYounes commented 6 years ago

No, I am not able to get it. There is a way to get it with serverless configuration ? My lambda is a react app with express server Thanks

jayair commented 6 years ago

To be honest, I have never used it this way. So I can't be of much help :(