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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:33:03+00:00 2026-06-06T23:33:03+00:00

I started up a completely new Rails and Facebook app and followed this guide

  • 0

I started up a completely new Rails and Facebook app and followed this guide to the letter.

I can see that a user is getting created and that it even becomes the current_user for the redirect after authentication, however, it doesn’t persist. As soon as I hit another controller action, it once again redirects and says I need to sign in.

I’d post my code if I thought any of it would be useful but the only differences between mine and what you see in this wiki ( https://github.com/plataformatec/devise/wiki/OmniAuth%3a-Overview ) are the puts statements in before filters and methods.

I’m not 100% sure how devise with omniauthable works but I do notice that in its self.find_for_facebook_oauth method, it takes in current_user as the 2nd argument and never uses it in the method. In addition, unlike other auth solutions, I don’t see it checking for an existing user session anywhere though I believe devise is supposed to take care of this for you.

Edit

I’m now pretty sure there is something incredibly wrong with omniauthable. I just added the following to my OmniauthCallbacksController

def facebook
  sign_in_and_redirect :user, User.first
end

Essentially this should just login the first user regardless of information. It does and redirects me to a page in my Welcome controller, however, when I try and hit the other action in that controller, I get told once again that I need to sign in. I really have no idea how the current_user is getting lost.

  • 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-06T23:33:05+00:00Added an answer on June 6, 2026 at 11:33 pm

    There are very few resources on how to use Devise’s omniauthable module. You might want to have a look at https://gist.github.com/993566 and http://edmiston.id.au/post/9204306833/omniauthable-my-version . The wiki is missing a few details.

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

Sidebar

Related Questions

Hey, I am completely new to Rails and just started created my first Project,
I have a controller in a Rails 3 app that, after creating a new
I'm completely new to rails and started playing with by taking an existing side
I am completely new to Qt. I started with a new Qt4 GUI Application.
I'm completely new to this framework and I'm trying to find some sample CRUD
I just started using the new project type SQL Server 2008 Database. I can
In my Rails 3 app, for some reason I'm getting a 302 in my
I've created a basic demo app in Rails 3.2.2 by using rails new demo.
I followed below tutorial and built one whole complete app. http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/ http://www.tonyamoyal.com/2010/09/29/rails-authentication-with-devise-and-cancan-part-2-restful-resources-for-administrators/comment-page-2/#comment-879 All is
I tried out rails 3, and just started a new project. The following is

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.