API gateway Cognito user pool authorizer - 401 unauthorized

前端 未结 2 784
无人共我
无人共我 2021-02-15 01:16

I was trying to get my API gateway work with Cognito user pools authorizer but I cannot seem to get it to work. I am not using any SDK as of now. Some details - for Cognito pool

相关标签:
2条回答
  • 2021-02-15 01:41

    Turned out to be a really idiotic mistake of copying the access_token as well. With the right id_token it worked. Took me 2 days to figure it out!!!

    0 讨论(0)
  • 2021-02-15 01:55

    I'd like to submit another really dumb reason why this was not working - definitely do everything in addition to everything that the accepted answer mentioned:

    I was performing my testing and validation on Postman. I added in the Authorization header and passed in my id_token. However, I never ticked the checkbox to actually include the header in my actual request: Hope this might save someone out there from spending hours debugging every possible configuration on API Gateway and Cognito only to realize I was never sending the header in the first place!

    0 讨论(0)
提交回复
热议问题