Just to get it out of the way: I do have emails working in my app.
I just added :confirmable to my user model.
app/models/user.rb
devise :database_authenticatable, :registerable, :omniauthable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable
I do have the confirmable part in the db:
db/schema.rb
create_table "users", :force => true do |t|
...
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
end
Because of the omniauth I have overwritten registrations_controller
:
app/controllers/registrations_controller.rb
def create
super
session[:omniauth] = nil unless @user.new_record?
end
So what I'm trying to figure out is… what do I need to add in order to:
Get confirmation email sent after the user signs up
Redirect the user to a custom page explaining the email is waiting to be confirmed (which they would get to if they tried signing in again without confirming)(answered here)(should be taken care of automatically?) When the user is verified redirect them to given page
Update: Right now, when I create a user it is automatically confirmed. Why is that?