sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

Authorize Lambda to access api with cognito and get token

Open KrifaYounes opened this issue 7 years ago • 5 comments

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 ?

KrifaYounes avatar Sep 18 '18 08:09 KrifaYounes

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

jayair avatar Sep 18 '18 23:09 jayair

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

KrifaYounes avatar Sep 19 '18 13:09 KrifaYounes

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

jayair avatar Sep 19 '18 19:09 jayair

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

KrifaYounes avatar Sep 19 '18 20:09 KrifaYounes

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

jayair avatar Sep 21 '18 21:09 jayair