Home > Enterprise >  Okta Angular: Error: The 'post_logout_redirect_uri' parameter must be a Logout redirect UR
Okta Angular: Error: The 'post_logout_redirect_uri' parameter must be a Logout redirect UR

Time:05-31

When I try to log out it displays this:

400
Bad Request
Your request resulted in an error. The 'post_logout_redirect_uri' parameter must be a Logout redirect URI in the client app settings: https://dev-81234586-admin.okta.com/admin/app/oidc_client/instance/0oa57yhuuyEUUMMqN5d7#tab-general

this is my configuration of application:

Sign-in redirect URIs 
Allow wildcard * in login URI redirect.
http://localhost:4200/callback

Sign-out redirect URIs 
http://localhost:4200/sign-out

this is my full URL:

https://dev-81234586.okta.com/oauth2/default/v1/logout?id_token_hint=eyJraWQiOiJUVlVDS0Fkdk1NNThHQzJEd2xSMkxDVVdZUHVJaEE0S0hJSWdrdWk0c2F3IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwMHU1N2ZwbnZ2a3lDSDJTSjVkNyIsIm5hbWUiOiJpYnJhaGltIGJha2hhbGVkIiwiZW1haWwiOiJsdXVrMzFAbGxlc3NvbnphLmNvbSIsInZlciI6MSwiaXNzIjoiaHR0cHM6Ly9kZXYtODEyMzQ1ODYub2t0YS5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiIwb2E1N3lodXV5RVVVTU1xTjVkNyIsImlhdCI6MTY1MzkyNzI3MiwiZXhwIjoxNjUzOTMwODcyLCJqdGkiOiJJRC5RYVotcTNHQWo1Y0FZNG1SajB4amU1YTEyV3o3SGRCNXNDV3FPN1lHNy1VIiwiYW1yIjpbInB3ZCJdLCJpZHAiOiIwMG81N2ZwbnBxNGc2RVBzdDVkNyIsIm5vbmNlIjoicnB1TmdVUkNNcDJFRGh1YkJWY1lramFGN3Z4a1F0UjRVVVpmOThiZ1BhWmtRQU05SEI4UGFzVHVJTDFpYm5CdSIsInByZWZlcnJlZF91c2VybmFtZSI6Imx1dWszMUBsbGVzc29uemEuY29tIiwiYXV0aF90aW1lIjoxNjUzOTIxMDUwLCJhdF9oYXNoIjoiLTRuUnlqOWNvd24yUXU1d1JVMFhjZyJ9.0tu7_tGc3Q4iYgeFeNybj2w8arhn92rEPwgGCLEtX7UYjzApxcxO8q5-gs-Of5MnAsKX1Qisl0Wl11oUlGEMUXuvjcyR10JvY5aFQSbTQH0o1EFqiXeSiy61Bu01pa6s8doIkZa1yxozya2UuAttp4z4R3_V--QaVtJ-E7O1gmNOmEanW70hDB0lGroHh7tWZ6qV4eqni7EaAzJVQ-NesA-sVdeFwiy_1LmXzb2wkAohYn-aiwJT3go5kr27fXCgznnudAVuN6vJ8q6SCtjb5qJes7cDyGji9iFRCT9tMDsQJ5T78EyIdcocHUblVrxV5D_j2Ofe5fGKaaQBe99ruA&post_logout_redirect_uri=http://localhost:4200

At the end of URL I see this: &post_logout_redirect_uri=http://localhost:4200 I dont know if it has a relation with the problem

CodePudding user response:

Yes, your post_logout_url parameter in your request to /logout end-point has different URL, than configured for your application

CodePudding user response:

Your configuration indicates that the post_logout_redirect_uri should be http://localhost:4200/sign-out but you are passing http://localhost:4200 instead.
Since the URLs do not match, Okta will not redirect you, since the sign out URL needs to be whitelisted.
Change the post_logout_redirect_uri parameter in you request to match the URL you have configured.

  • Related