如何使用 Cognito LOGOUT 端点真正注销?
How to use Cognito LOGOUT endpoint to really log out?
我正在尝试使用联合身份验证启用 Microsoft AD 登录。它工作正常,我们可以登录。但是,当我按照文档所述 ( https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html ) 调用 LOGOUT 端点并尝试再次登录时,我不会被重定向到 Microsoft 页面以再次输入我的电子邮件和密码。
我输入的电子邮件和密码似乎在缓存中,如果我清理缓存,我就可以再次看到这个登录页面。我们怎样才能真正以用户登录时需要再次输入电子邮件和密码的方式注销用户?
编辑:我按照答案中的建议启用了 'Sing Out Idp Flow',但现在我收到 400 条回复说 "Required String parameter client_id is not present"
有人知道如何解决这个问题吗?
您需要确保您 select 'Enable IdP sign out flow' 在 Cognito 中使用您的 SAML 身份提供商。将浏览器导航到注销端点后,您还应该被重定向到 SAML IDP 注销。
Select Enable IdP sign out flow if you want your user to be logged out
from the SAML IdP when logging out from Amazon Cognito.
Enabling this flow sends a signed logout request to the SAML IdP when
the LOGOUT Endpoint is called.
Configure this endpoint for consuming logout responses from your IdP.
This endpoint uses post binding.
Edit: I enabled 'Sing Out Idp Flow' as suggested in the answer but now I'm getting a 400 response saying "Required String parameter client_id is not present" Does anybody have any clue how to solve this problem ?
您需要在调用注销端点时包含client_id参数,该参数在您提供的文档中按要求指定。客户端 ID 可以在 AWS Cognito 控制台的用户池 > 您的用户池名称 > 应用程序集成 > 您的应用程序客户端名称中找到,您应该会在那里看到一个客户端 ID。
我正在尝试使用联合身份验证启用 Microsoft AD 登录。它工作正常,我们可以登录。但是,当我按照文档所述 ( https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html ) 调用 LOGOUT 端点并尝试再次登录时,我不会被重定向到 Microsoft 页面以再次输入我的电子邮件和密码。
我输入的电子邮件和密码似乎在缓存中,如果我清理缓存,我就可以再次看到这个登录页面。我们怎样才能真正以用户登录时需要再次输入电子邮件和密码的方式注销用户?
编辑:我按照答案中的建议启用了 'Sing Out Idp Flow',但现在我收到 400 条回复说 "Required String parameter client_id is not present"
有人知道如何解决这个问题吗?
您需要确保您 select 'Enable IdP sign out flow' 在 Cognito 中使用您的 SAML 身份提供商。将浏览器导航到注销端点后,您还应该被重定向到 SAML IDP 注销。
Select Enable IdP sign out flow if you want your user to be logged out from the SAML IdP when logging out from Amazon Cognito.
Enabling this flow sends a signed logout request to the SAML IdP when the LOGOUT Endpoint is called.
Configure this endpoint for consuming logout responses from your IdP. This endpoint uses post binding.
Edit: I enabled 'Sing Out Idp Flow' as suggested in the answer but now I'm getting a 400 response saying "Required String parameter client_id is not present" Does anybody have any clue how to solve this problem ?
您需要在调用注销端点时包含client_id参数,该参数在您提供的文档中按要求指定。客户端 ID 可以在 AWS Cognito 控制台的用户池 > 您的用户池名称 > 应用程序集成 > 您的应用程序客户端名称中找到,您应该会在那里看到一个客户端 ID。