I use @auth0/auth0-react v2.2.4. The app I’m building has dynamic pages that have various entity IDs in the URL. It means I cannot have them listed as Allowed Logout URLs.
After a user logs out, I want to show them the login page with the ?redirectTo= value equal to the address they log out from. So when they log in again, they will see the page they were logged out from.
How do I achieve that?
Hi @serhii.holinei
Welcome back to the Auth0 Community!
Thank you for posting your question, we have a dedicated doc page about your problem with dynamic parameters which you can find here → Log Users Out of Auth0 with OIDC Endpoint
The OIDC Logout endpoint parses query string parameters in the URL provided to the post_logout_redirect_uri parameter.
You must include these query string parameters in your Allowed Logout URLs, or the logout request may be denied.
For example, if you pass https://example.com/logout?myParam=1234 to the post_logout_redirect_uri parameter (encoded as https%3A%2F%2Fexample.com%2Flogout%3FmyParam%3D1234), you must include https://example.com/logout?myParam in your Allowed Logout URLs.
Thanks
Dawid