The players are Devise, Devise Confirmable, and Omniauth Facebook. The issues at hand is that either when I sign up with email or Facebook, the user is not being confirmed in the database and is essentially locked out of the application.
I have provided a series or screenshots to show the issues and will also show the code.
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController def facebook @user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user) if @user.persisted? sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated set_flash_message(:notice, :success, :kind => "Facebook") if is_navigational_format? else session["devise.facebook_data"] = request.env["omniauth.auth"] redirect_to new_user_registration_url end end end
- My used upon clicking my confirmation link is not confirmed
- I don’t know where they redirect is coming from since I do not have a confirmations model or controller
- The user is locked out of the app
EDIT: When I manually change the confirmed_at time in the console I can sign in. So now my question becomes, where should that logic be?