Closed dankimio closed 5 years ago
Thank you 😊
You could do that by stitching together half of the Registering users example and the contents of create
in SessionsController
.
if (user = User.find_by(email: params[:email])
# send email
else
# create user, send email/sign in
end
I won't write an example for you but do update this if you make something work!
What would be the correct procedure for overriding SessionsController
without copying the whole class?
Okay, so I implemented fetch_resource_for_passwordless
with find_or_create_by(email: email)
in my class and it basically works as instant sign-up.
First of all, thanks for the gem, great work!
Some apps do not require separate registration and combine sign in and sign up forms. If there's no user with such email, the app creates a user with that email and sends a confirmation link.
How can this flow be implemented with passwordless?