Hi, we use Kratos for a B2B SaaS app. Explicit inv...
# talk-kratos
m
Hi, we use Kratos for a B2B SaaS app. Explicit invitations to new users by email is a key workflow for our customers to grant access to their organizations to staff members. This is a limitation of ORY given that we have to use the workaround that involves creating an identity, and then simultaneously following up with an account-recovery link. The big issue we are having is that the magic links expiry as soon as they are clicked. For the various reasons called out here, this is problematic. I would love some guidance on whether the following options are worthwhile to explore: 1. Switch to one-time-code, but don't actually make the user input it into the "Sign Up form" where they set their password. The email links we send out could add a query parameter with the one-time-code that we then place into a hidden input in the "Sign Up form". This essentially allows us to keep our existing flow, but just stop the links from expiring as soon as they're clicked. 2. Make the invitation email link direct the user to a public Self-serve User Registration form (possibly with email value of form filled in), and once complete, we verify the email. Once email is verified, we can have the user "accept the invitation". Its more steps for the user, and allows anyone to join, but might align better with how ORY is built.
m
The way we solve it in Ory Network is 1. and prefill the one-time code. So its not invisible but prefilled and the user just needs to click the link in the email. IMO its a good solution for you and shouldn't be too hard to do in your frontend - you can check out our reference UI for pointers I think.
m
Thanks @magnificent-energy-493! Glad to hear Ory has implemented it that way.
@magnificent-energy-493 Would be great to have that guidance in the Invite users KBA.
m
Thanks for the feedback, and I agree - have put it on my backlog to update this particular doc. I am looking to do some bigger updates in the docs in the coming months and this should be part of it.