When logging out of Cognito, I have had success using the following format:
In your Cognito User Pool, under the App Client settings, you will need to add the URL for your logged-out page in the "Sign out URLs" text box.
You can have your loggedout.html page redirect users to a different page if needed.
Don't forget to urlencode "logout_uri" in a GET call if your framework isn't doing it for you (for example when testing from a browser manually).
For sending to https://locahost/ for example I did the following:
Also, adding to the current answer for clarity. The docs say EITHER: logout_uri OR redirect_uri are required. doc link
Logout_uri is used when sending back to a static logout page. redirect_uri is used to redirect to a page that can request login and maintain state. In that case things like "response_type" are also required.
Cognito Federated user logoutasked 5 months ago
Amazon Cognito: how to change the Endpoint in AWS SDK .NET?Accepted Answerasked 2 months ago
Calling User Pool endpoint has any quotas?asked 7 months ago
Amazon Cognito user pool LOGOUT endpoint is not working as expectedAccepted Answerasked 9 months ago
Cognito logout endpoint doesn't support options, so how can CORS preflight work?asked 3 months ago
Is Cognito OAuth Logout 'state' param supported?asked 7 months ago
What does the Cognito Logout endpoint (/logout) actually do?asked 24 days ago
Post confirmation cognito trigger is not workingasked 5 months ago
AWS Amplify AppSync Cognito User Poolasked 6 months ago
cognito hosted ui logout failing withasked 2 years ago