Hi. We're looking for advise on how best to handle...
# ory-network
m
Hi. We're looking for advise on how best to handle an invite flow - users aren't able to register directly. Process: - An existing organisation user (it is multi-tenanted system) invites User B to their org, specifying what permissions they will be assigned - User B receives the invite email and accepts it, thereby granting them access to the organisation account. Is there a recommended way to achieve this? https://www.ory.sh/docs/kratos/manage-identities/invite-users says to create the identity in Ory right away, but I'm reluctant to do that for users that may never accept the invite (happy to be persuaded otherwise). Current plan is to use a custom UI: - Create an invite record (email + permissions); send an invitation email - Accepting the invite will create a verified identity in Ory, and using the ID, create the account in our system. Are there other options?
m
Hello @average-iron-40995 The option you described with the custom UI sounds good! Our recommended invite flow is a bit less work to set up - but as you rightly noted there is the edgecase of the user not accepting the invite. What you could do it run a cron job or something that deletes all users that did not accept the invite after X days. I think those are your best options at the moment. That being said we have a "dedicated" invite flow on the roadmap, this is something we will look at next year. It is not a trivial problem, but we want to improve the invite flow a lot in the mid-term.