dazzling-nightfall-42114
01/28/2025, 3:49 AMPOST /admin/sessions
Why do I want this? We have a partner who needs single sign on with a custom protocol (similar to, but not oidc.) We have a lambda that implements the protocol, verifies the user’s identity, fetches their profile from the partner and creates an account for them. But if they already have an account we would like to create a session for them instead. We have considered things like faking a code
login flow on their behalf, but that seems like a very ugly hack. The partner are unwilling to implement oidc for their own reasons. I’ve searched github discussion but have only found creating sessions discussed in the context of testing, I haven’t seen anything about creating ory sessions outside of a LoginFlow
in production. Thanks everyone!magnificent-energy-493
dazzling-nightfall-42114
01/28/2025, 11:37 PMmagnificent-energy-493
dazzling-nightfall-42114
01/30/2025, 12:24 AMPOST /admin/recovery/code
, which they can use (after a few steps) to get a session for any user, so it doesn’t seem like preventing the admin API from creating sessions changes who can do what. But I understand that you don’t want to encourage sending cookies around.
Really appreciate your help Vincent, I’ll go back to our partner and explain that Ory strongly recommend adding a user interaction (we will probably use a code
login). All the best!magnificent-energy-493