authentication - Email based interaction with rails app -
i need gem allow users interact rails app through email, without need register. example: publish sale, accompanied email, , of controls (crud, , submitting) on email links (delete, update, , on). i'll to, somehow connect devise, opportunity of further registration using same email shopping history.
to publish something(services or products) sale user has fill:
name, email (validates unique), phone. may or may not used future registration using devise.
in same form may be: pictures, description, , other fields of product.........
the idea store: id, name, email, phone in user db without password, or somehow pending registration
just create own crud controller authorization based on hash add url. store hashes in database , verify if user legitimate perform action.
warning: valid url able perform these actions.
well, in comment wrote want integrate devise. devise supports login tokens existing users. should somehow virtually register them. easiest approach to:
include user email in url tolen
check if have such user - add token verification here
user = user.find_by_email(params[:email]) if user.nil? user = user.create(field_1: value1, field_2: value2) end sign_in(user) redirect_to after_sign_in_path(user)
done. user authenticated based on email , token included in url.
Comments
Post a Comment