amazon-web-services - 登录后使用 cognito 返回 401 的亚马逊负载均衡器

标签 amazon-web-services http amazon-cognito amazon-elb aws-load-balancer

我们的应用程序前面有一个 Amazon Load Balancer,Cognito 作为我们的 IdP。我们可以进入登录页面。用户登录后,他们会得到一个“401 Unauthorized”页面,其 url 为:

https://xxxxx.com/oauth2/idpresponse?code=xxxx&state=xxxx

我们收到此错误的原因可能是什么? Amazon 似乎有关于此 [0] 和 [1] 的非常简单的文档。我们已经确保所有 oauth2 端点都是正确的(oauth2/token、oauth2/authorize 等)。不确定还有什么地方可以看。

我们的设置大致如下所示:https://www.exampleloadbalancer.com/auth_detail.html

[0] https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-401-issues

[1] https://aws.amazon.com/premiumsupport/knowledge-center/elb-configure-authentication-alb/

[2] https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html

最佳答案

回答我自己的问题。

原来遇到 401 的用户在他们的网络中使用了代理。该代理出于某种原因阻止了我的网站(最后,这与 cognito 无关)。

关于amazon-web-services - 登录后使用 cognito 返回 401 的亚马逊负载均衡器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63528991/

相关文章:

node.js - 将 getItem 与 DynamoDB 和 Node aws-sdk 库一起使用时出错

amazon-web-services - 具有相互身份验证的 AWS 安全 REST API

http - 如何在asp classic中获取作为正文发布的值的内容?

amazon-web-services - AWS Elastic Kubernetes服务:如何将容器/容器暴露给AWS内部的Elasticsearch集群?

amazon-web-services - AWS 日志代理设置

http - 从 node.js 中的相同端口监听和请求

javascript - 如何获取 Facebook 好友的生日?

amazon-web-services - AWS 云形成 : Cognito LambdaTrigger CustomEmailSender - Property "Not currently supported by AWS CloudFormation." and CDK usage

swift - Amazon Cognito 使用 saml 对用户进行身份验证并从 DynamoDB 获取表数据。 swift

amazon-web-services - 在 AWS Cognito 中重新发送 phone_number 属性验证码