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

  • SEARCH
  • Home
  • 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 8514841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:58:48+00:00 2026-06-11T04:58:48+00:00

I am using omniauth-facebook gem to do some Facebook login stuff. The call works

  • 0

I am using omniauth-facebook gem to do some Facebook login stuff. The call works in such a way that when /auth/facebook is called, it does the authentication process. All of that works fine when I manually enter the URL: http://localhost:3000/auth/facebook

However, when I took my code only, my domain is setup such that my apps have URLs such as:

http://railsapps.mydomain.com/app1  
http://railsapps.mydomain.com/app2  
http://railsapps.mydomain.com/app3

etc.

Now in my index page I have a link that is written in my .html.erb file as such:

<%= link_to "Sign in with Facebook", "/auth/facebook", id: "sign_in" %>

When I run this locally and click on the link it correctly goes to localhost:3000/auth/facebook and everything is good in the world. However, when I go online with this same code and click on this link it goes to: http://railsapps.mydomain.com/auth/facebook (which of course doesn’t work, since it should be going to railsapps.mydomain.com/app1/auth/facebook.

Any help that could be provided in this regard would be greatly appreciated.

Thank you.

  • 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-11T04:58:51+00:00Added an answer on June 11, 2026 at 4:58 am

    You should be able to use this:

    <%= link_to "Sign in with Facebook", root_url + "auth/facebook", id: "sign_in" %>
    

    or if that doesn’t work try request.host:

    <%= link_to "Sign in with Facebook", "http://#{request.host}/auth/facebook", id: "sign_in" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using devise and create login with Facebook using omniauth, but having problem
I am using the paperclip gem with Omniauth (with Facebook) in a Rails 3
I'm using omniauth-facebook gem with rails 3.2 and devise 2.0. I have a website
i got a question that I' using omniauth to authenticate my user to facebook.
Using Omniauth version 1.0.2, currently when I call env[omniauth.auth][info][image] to get the image for
I'm using Rails, Devise, and Omniauth, and I'm trying to login using facebook connect.
I am developing an application in Rail 3 using the Omniauth gem for Facebook
I am using Omniauth and forcing /auth/facebook to display in a popup (with JS).
I am using Omniauth in my Rails project, and I'd like to hide /auth/facebook
I'm using OmniAuth with Devise to allow users to login with facebook or to

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.