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.
Comes back to verify their college email and phone number
They click the link and this is where they go (nowhere really)
In the console, the user has failed to be confirmed yet which may be the issue
omniauth_callbacks_controller.rb (users)
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
I tried something where I deleted the users/show.html.erb and this is what I found
TL;DR
- 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?