Signup_with_email() without accepting a password

Here you go, try this:

This is set up with a front end form, which lets users sign up with just an email and a click yes to privacy. (Add whatever fields you like and handle them however you want).

It handles the rest of the login flow in the back end, creating a random NIST compliant password and all still using the users service, so the confirmation email is automatic.

Then, when a user logs in, they just enter their email and get sent a magic link, again straight from the users service, and when they click though from email the form takes them straight to the logged in page if their account is valid.

I chucked some very basic validation errors for the front end forms because I’m wired up all wrong and can’t stop myself.

By doing it this way, you kind of make it easier for yourself to add alternative login options later if you scale / needs change.

3 Likes