Just wanted to give a short update that I was able to implement the idea successfully, so that now anyone with the same domain can login via code if the domain is known (meaning, at least one registered user with that domain exists).
Obviously, non unique domains such as “gmail” are a problem to think of. I went the easy/practical solution and kindly ask them to request access via contact, if the mail address is not known (if they are, they just proceed to the code). For my setup it’s an edge case but I thought it would be nice to have it anyway due to being more versatile.
In addition to your ideas @samzzi & @lukasbestle the thread below and the working case within from Anthony1 where a huge help.
Cheers ![]()