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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:51:08+00:00 2026-05-26T04:51:08+00:00

I am fixing an application that needs to support duplicate sign in requests being

  • 0

I am fixing an application that needs to support duplicate sign in requests being sent to the server (for devise). The requests are sent via JSON. Currently, if I call the following more than once:

curl -v -b cookie.file -c cookie.file -H "Content-Type: application/json" -X POST -d '{"user":{"username":"kevin","password":"password"}}' http://localhost:3000/users/sign_in.json

The first results in a 201 status code and the second results in a 302 that redirects to an HTML page. I’ve overridden the create method in Users::SessionsController, however the custom code is only called on the first POST (nothing happens for the second). Any way to get the second request to not performa redirect? Here is what I have so far:

class Users::SessionsController < Devise::SessionsController
  def create
    logger.info "Users::SessionController"
    super
  end
end
  • 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-26T04:51:09+00:00Added an answer on May 26, 2026 at 4:51 am

    I ended up here as I had the same issue. The sign in for non-navigational formats weren’t idempotent as I was redirected to the html-version if I was already authenticated.

    This issue has been resolved as of 29th of September with this commit.

    As of today you have to use edge devise to get it working with your app.

    # Gemfile
    gem 'devise', git: 'git://github.com/plataformatec/devise.git'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to build an application that inherently needs good time synchronization across
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
I'm fixing a bug with Windows Vista 64 bits of a 32bit application, when
I'm currently fixing a JSP project and it currently has a seemingly random collection
I have a web application which uses URLs that look like this: http://library.example.com/Register.aspx?query=academic&key=586c70bb-5683-419c-aae9-e596af9ab66a (The
I am maintaining an old J2EE web application and been getting complaints about fixing
We are working on a restful application that has a 'whiteboard' like feature. I
I am in the process of developing a web application that consists visually of
I found this open-source library that I want to use in my Java application.
We are using an extractor application that will export data from the database 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.