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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:23:29+00:00 2026-05-20T17:23:29+00:00

My user experience involves users submitting a form before they’ve authenticated (using omniauth). I

  • 0

My user experience involves users submitting a form before they’ve authenticated (using omniauth). I started doing something like this:

    def self.require_facebook_authentication!(options={})
      before_filter :redirect_to_facebook_if_not_authenticated options
    end

    def redirect_to_facebook_if_not_authenticated
      if !logged_in?
        session[:param_cache] = params
        session[:original_destination] = request.fullpath
        redirect_to '/auth/facebook'  

      end
    end

Then, on hitting the auth callback, redirect to a page that submits a form with the post params inline, for a total of 3 redirects (/stuff/new/ on POST -> auth/facebook -> facebook -> /auth/facebook/callback [ html template with POST form ] -> /stuff/create). I’d rather not create an authentication popup; instead, I’d like to navigate to a separate page, log in, and redirect to the completed action.

I’m fairly new to Rails, so I’m still learning – is this already built in to another framework? Am I missing something really basic? Thanks in advance!

  • 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-20T17:23:29+00:00Added an answer on May 20, 2026 at 5:23 pm

    if you are asking as to whether or not there is a “RAILS” way that will automatically post the data after a redirect, the answer is no (see https://stackoverflow.com/questions/985596/redirect-to-using-post-in-rails)

    In my opinion the safest, easiest, and most RESTful way to achieve what you want would be to simply have the params you are eventually posting stored in session so that you can redirect back to the original ‘new’ page and have the form automatically prefilled with the post data. Sure this is one extra step for the user, but since REST doesn’t allow for redirects to POSTs it is imo the cleanest way to go about it

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

Sidebar

Related Questions

Aside from enhanced user experience, do Ajax calls provide any significant performance benefit?
i have a wordpress blog and want to give people the same user experience
What are your opinions and experiences regarding using TDD when developing an user interface?
User kokos answered the wonderful Hidden Features of C# question by mentioning the using
To increase user experience, I would like to warn the user that the file
I am interesting in creating a better User Experience (UX). There are a lot
First of all: I am not an experienced ClearCase user, but I have lots
User equals untrustworthy. Never trust untrustworthy user's input. I get that. However, I am
User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means
User A logs into a ticket management system to edit content on SomePage.aspx User

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.