-
Im running Hydra and Kratos in a development environment using docker and a simple/default config and i don't seem to be able to get the logout flow to work as intended. I have configured my third party client in Hydra by running the command: docker-compose exec hydra \
hydra clients create \ --endpoint http://localhost:4445 \
--id next-client-test \
--secret secret \
--grant-types authorization_code,refresh_token \
--response-types code,id_token \
--scope openid,offline \
--callbacks http://localhost:3003/api/auth/callback \
--post-logout-callbacks http://localhost:3003 From the third party app i initiate a logout sequence when a user clicks a logout button: async function handleLogout(req: NextApiRequest, res: NextApiResponse) {
const logoutUrl = new URL("/oauth2/sessions/logout", hydraUrl);
logoutUrl.searchParams.set("id_token_hint", req.cookies.id_token);
logoutUrl.searchParams.set("post_logout_redirect_uri", selfUrl);
logoutUrl.searchParams.set("state", state);
res.writeHead(302, {
Location: logoutUrl.toString(),
});
res.end();
} I'm expecting that the browser is redirected to hydra and a logout_challenge is generated and added to the query parameters of my configured logout page (which is configured in the yaml file as below) which the user should be redirected to. urls:
self:
issuer: http://localhost:4444
consent: http://localhost:4455/oauth/authorize
login: http://localhost:4455/oauth/login
logout: http://localhost:4455/oauth/logout I have configured my The problem i'm having is eIther my login page is never hit, so the logout code is not executed (the user is returned to the I'm not sure how to debug this or how to move forward so any pointers would be greatly appreciated.
Thanks for the help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Any ideas? This seems like an issue with hydra to me? |
Beta Was this translation helpful? Give feedback.
-
Hey @dan2kx , just checking in if your problem still persists. |
Beta Was this translation helpful? Give feedback.
Hey @dan2kx , just checking in if your problem still persists.
I will mark this as answered for now, but feel free to come back to the discussion any time.
Thanks a ton 🐝