if params[:confirm_token] == "true"
user = User.find_by(email: params[:email])
binding.pry
sign_in(user)
# super
end
I need to authenticate user without a password.
I tried the sign_in(user), but when it renders it says 401 invalid credentials
Tried to sign in the user using sign_in method but that didn't work.
You can define custom strategies in devise. By adding the custom strategy devise gem will be taken care of user login.
add a strategy file initializers folder
Add the strategy to warden manager
Use the strategy in warden authentication