Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7447743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:42:56+00:00 2026-05-29T12:42:56+00:00

With the Confirmable module enabled, Devise will not allow an unconfirmed user to sign

  • 0

With the Confirmable module enabled, Devise will not allow an unconfirmed user to sign in after a predefined period of time has elapsed. Instead the user is redirected back to the sign in page with the flash message “You have to confirm your account before continuing”.

This is an undesirable interaction model, as a flash notice does not provide adequate space to properly explain to the user why access has been denied, what “confirm your account” means, provide a link to resend the confirmation, and instructions on how to check your spam folder and so on.

Is there a way I can change this behaviour to redirect to a specific URL instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:42:58+00:00Added an answer on May 29, 2026 at 12:42 pm

    Sorry at first I thought you meant after Sign Up not Sign In. So the down below works for how to direct users after Sign Up and what you need to do for Sign In is to create a custom Devise::FailureApp

    See the wiki page: https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-when-the-user-can-not-be-authenticated

    Then within your custom FailureApp overwrite redirect_url method from https://github.com/plataformatec/devise/blob/master/lib/devise/failure_app.rb:

      def redirect_url
        if warden_message == :unconfirmed
          custom_redirect_path
        else
          super
        end
      end
    

    For custom redirect after Sign Up:

    There is a controller method after_inactive_sign_up_path_for within the RegistrationsController that you can overwrite to accomplish this.

    First in your Routes you will need to specify to use your custom controller:

    config/routes.rb:

      devise_for :users, :controllers => { :registrations => "users/registrations" }
    

    Second you create your custom controller that inherits from the normal controller in order to overwrite the method:

    app/controllers/users/registrations_controller.rb

    class Users::RegistrationsController < Devise::RegistrationsController
    
      protected
    
      def after_inactive_sign_up_path_for(resource)
        signed_up_path
      end
    
    end
    

    In this case for my App my Devise model is User so you may want to change that namespace if your model is named differently. I wanted my users to be redirected to the signed_up_path, but you can change that to your desired path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails 3 project with Devise, confirmable enabled so the user has
I am using Devise :confirmable and :recoverable module to confirm a user and to
I'm using Devise with the confirmable module. When unconfirmed users are trying to login,
I recently added devise confirmable module to my rails app. My application runs well
I have a rails 3 application that uses Devise and the confirmable module. However,
I have a sign up mechanism which completes after link to activation through confirmable.
I've seemingly set up Devise for my User authentication, with the :confirmable option set.
Here is a Ruby class: class User devise :trackable, :confirmable end For most instances
Right now, I have three models Post, Comment and User (using Devise ) associated
I've noticed that created resouce attributes are all blank after executing build_resource at Devise::RegistrationsController

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.