Amazon Cognito的用户池登出端点LOGOUT endpoint 未按预期工作。

0

【以下的问题经过翻译处理】 在Amazon Cognito开发者指南中 - LOGOUT端点https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html中指出,注销端点的唯一必需请求参数是client_id

但是,当我使用我的client_id调用注销端点时,它会抛出一个错误“Required String parameter 'redirect_uri' is not present”(截图参见https://drive.google.com/file/d/1i14NI6s-ygzvyNWYprURn6wqZD8IMO6I/view?usp=sharing)。

这是我用于注销的URL: https://<mydomain>.auth.us-east-1.amazoncognito.com/logout?client_id=<my app client id>(我只是将我的Web应用程序重定向到此URL进行注销)。

profile picture
EXPERTE
gefragt vor 6 Monaten55 Aufrufe
1 Antwort
0

【以下的回答经过翻译处理】 我已经使用以下方式成功注销Cognito 时,:

https://<your-cognito-domain>/logout?client_id=<your-app-client-id>&logout_uri=<url-for-your-logged-out-page>

在您的 Cognito 用户池中,您需要在应用程序客户端设置下添加您的退出登录页面的 URL 在“注销 URL” "Sign out URLs" 文本框中。

如果需要,您可以将您的 loggedout.html 页面重定向用户到不同的页面。

profile picture
EXPERTE
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen