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 8205075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:06:10+00:00 2026-06-07T08:06:10+00:00

I am using devise gem in a rails application with multiple subdomains. Each subdomain

  • 0

I am using devise gem in a rails application with multiple subdomains. Each subdomain is handled by respective controller, which look like this:

class Subdomain1Controller < ApplicationController
  before_filter :authenticate_user!
  def index
  end
end

With above controller implementation, Devise always keep subdomain while redirecting user to login page. In above case, Devise redirect user to http://subdomain1.acmesite/users/sign_in instead of a common sign_in Url.

This leads to having multiple sign_in urls for each sub-domains.

http://subdomain1.acmesite/users/sign_in
http://subdomain2.acmesite/users/sign_in
http://subdomain3.acmesite/users/sign_in

I am wondering if it’s possible to override devise method to exclude subdomain part from the url and yet keeping the previous page url information. More preciously, I wants Devise to redirect user to a specific Url (like: http://acmesite/users/sign_in) irrespective of subdomain and after successful authentication, Devise should return user back to the caller subdomain+page.

  • 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-06-07T08:06:12+00:00Added an answer on June 7, 2026 at 8:06 am

    I droped Devise gem from my project and now using Sorcery instead.

    Sorcery provide me complete control over controller and view, fully comply with my project requirements. With six months running on production after this transition, I am happy with Sorcery gem.

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

Sidebar

Related Questions

I'm using devise gem to implement authentication in my Ruby On Rails application. Sometimes
We've got a Rails application just upgraded to Rails3 using Devise's Rails3 gem for
I'm using the Devise Ruby gem in my Ruby on Rails 3 application. When
I have such problem: I'm using rails, devise gem and jQuery validation plugin. I
I am using rails 3 with gem devise.Devise has built in method for change
Hi I am using the devise gem for rails for app. My question is
I need to know how configure the gem devise,Im using ruby 1.9.2, rails 3.1.3,
I'm using devise to handle my users and as part of my application each
I want to suspend users in my Rails application. I am using Devise. I
if i am using the devise gem with rails, how do i make the

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.