Is there only one way to implement invite links(cr...
# talk-kratos
n
Is there only one way to implement invite links(creating the user through the admin api and creating a recovery link)? I think this is a workaround and I would like to create an invite link without creating the user first. Idea: I create a registration flow on the server, then use the returned flow url as the link. But then I would need to disable the creation of registration flows through the public kratos api, and only allow it through the admi api. I would also need a way to list the active registration flows through the admin api, so I can revoke an invite. I think this idea is bad, because then im not initializing the flow in the browser, and kratos wouldn't set the cookies... Other idea: • I disable the "/registration" public route in the reverse proxy config, so the public kratos api can't initialize registration flows. • I create an invites table in my database • On invite creation, add an entry to this table, generate a new invite link with using the entity ID • Create an api route on my server, that checks the validity of an invite link • When user clicks the link, it will call my custom api route, check the invite link, then if valid, proxy the request to kratos for browser registration flow initialization. Would this work? Would this be secure? Is there a recommended way for handling invites, other than the recovery link workaround?