Hey guys, I have a setup of Hydra, Kratos and the ...
# ory-selfhosting
b
Hey guys, I have a setup of Hydra, Kratos and the https://github.com/ory/kratos-selfservice-ui-node UI node running. All my flows are working great. I only have the problem that when I want to change user, I get this Error: “Subject from payload doesn't match subject from previous authentication”. I found a possible solution, but I am not sure how to proceed. The documentation says this: https://www.ory.sh/docs/hydra/guides/openid for my issue. The error is directly described at the end. Do I actually have to change the UI node reference implementation or just some configuration in Kratos/Hydra to allow same users to log in different accounts simultaneously? Thanks in advance 🙂
m
Hey @bright-hairdresser-80168
allow same users to log in different accounts simultaneously
I am not sure if that is possible with the Kratos+Hydra setup. Can you tell us a bit more about the use case? We can probably find a solution if it is something not very exotic.
b
Hey, I kind of found a solution. I use my setup to let users login ans authorize Client A and B with the same hydra, kratos and self service ui. Problem is accounts for Client a don't have the scope for Client B and vise versa. So if you log in an account for Client A and then go on the page for Client B and start the log in flow it doesn't work. I changed my initial login call to hydra to include ?prompt=login which starts the login flow and ignores the existing one partially. That leads to a confirmation page which tells the user he is still logged in with account A and gives an option to log out and start the flow with account B.
m
Oh that sounds like a neat solution @bright-hairdresser-80168 ! Do you think that is something we should/could document as a short guide? Aka “If you want to implement login via Hydra OIDC with 2 different clients on one endpoint, this is a solution” ? Let me know if you think that makes sense to document and would be up to share some of your notes 🙏