ruby-on-railsruby-on-rails-4.2devise-confirmable

how to skip email confirmation using devise_token_auth?


I'm using devise_token_auth gem for my Rails app. I want to login into application once the user sign_up is done. How can I skip confirmation.

I tried config.reconfirmable = false but no luck

Can anyone suggest me or help me how can I achieve this? I tried the solution provided

Why won't Devise allow unconfirmed users to login even when allow_unconfirmed_access_for is set? But still ending up with

{"success":false,"errors":["A confirmation email was sent to your account at test123@gmail.com. You must follow the instructions in the email before your account can be activated"]}

Solution

  • Add the following callback the model definition:

    before_save -> { skip_confirmation! }
    

    And remove :confirmable from included devise modules:

      devise :database_authenticatable, :recoverable,
             :trackable, :validatable, :registerable,
             :omniauthable # there is no :confirmable here