Hey everyone, a question regarding oid login flow....
# talk-kratos
h
Hey everyone, a question regarding oid login flow. Usecase: I use a fresh oid provider that has not been attached to an identity in ory. I choose this fresh provider to log in with, and I end up registering a new identity with that oid. Is there a workaround to not register users on that flow?
help
😂 1
h
do you want existing users to link the social sign in account?
h
no no, linking and unlinking is already a part of our application, so all good here. the problem occurs when a user tries to log in with a fresh oid with a fresh (not connected to ory) email — they are automatically registered tho they actually tried to log in. and also to be sure I am not hallucinating: according to our QA, a couple of weeks ago instead of creating ory identity, users would be redirected to register in those cases. Was that so? 🤔 the problem for us is the following — because we run a bunch of post-registration actions after creating an ory identity (on the FE side), a user that is registered through login flow is a big PITA.
also it does seem inconsistent with email login flow — if you try to log in with non-existent email, ory would not create a new identity but throw an error. whereas with oid for some reason it will create an identity they didn’t ask for 🥲
I am seriously confused for reals
h
We trigger a registration flow if a user that doesn’t exist tries to log in. We show the registration form if data is missing (according to the identity schema) and skip that step if that’s not the case. This has always been like that so nothing changed 🙂
So your hooks will trigger correctly!
h
that is sadge : ( is there a workaround to not trigger the registration hook?
h
Not right now, I personally found it always very annoying when I tried to use a product and used social sign in, just for the system to say “oh you used the wrong button please sign in instead and do the exact same thing again”. have you tried using web hooks to do post-registration things? that would be a more robust solution in my opinion
h
so the thing is that I am operating in the login domain (for these usecases), and I am returned to the homepage already having a session. our pre- and post- hooks are a bunch of functionalities like first, validating a slug users choses, then, after ory identity creation we need to create an identity in our system and link them, and then still do a bunch of stuff, and it all only happens when you explicitly call a registration flow. TLDR: we have a workaround, it’s just not pretty 💅 I hoped there is a workaround that will make my life easier, but I guess I will have to keep suffering 🥲 Thank you for the explanation 🙌
h
Oh nooo, no suffering 😞 😞
then, after ory identity creation we need to create an identity in our system and link them, and then still do a bunch of stuff, and it all only happens when you explicitly call a registration flow.
Wouldn’t a web hook fix this for you? We’re using it to sync users to e.g. stripe after registration, see: https://www.ory.sh/docs/kratos/guides/integration-with-other-systems-using-web-hooks
Web Hooks work in cloud also, if you need some help with it, let me know!
h
oh, I will then have a look now! thank you 🍪
h
You can’t configure it in the UI right now but if you need help to configure it using the CLI let me know
👀 1
(feel free to ping me if that is the case, I don’t always see the messages here)
h
ok, loooking! thank you 🍦