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

The Archive Base Latest Questions

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

In a Couchapp, I would like to have a login form that works without

  • 0

In a Couchapp, I would like to have a login form that works without Javascript.

The wiki page about the Session API states that one can provide a next parameter to _session to be redirected after authentication success or failure.

This sounds great and I would like to redirect to a show function that can then check the user’s credentials and display something accordingly.

I tried using a form:

<form action="/_session" method="POST">
  <input type="text" name="name">
  <input type="password" name="password">
  <input type="hidden" name="next" value="/somewhere">
  <input type="submit">
</form>

as well as using curl:

curl -X POST http://localhost:5984/_session -d 'name=foo&password=bar&next=/somewhere'

but without success: I keep receiving code 200 (OK) if my credentials are correct and code 401 (Unauthorized) if they are not, but I never get the 302 (Redirection) that I expect.

Is this feature gone (I’m using Couchdb 1.1) or am I doing it the wrong way?

If this feature does not exist anymore, do you have an alternative?

  • 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-23T22:29:35+00:00Added an answer on May 23, 2026 at 10:29 pm

    After browsing through the source code, it looks like the feature was implemented in v1.1.0.

    See the next parmeter implementation in the CouchDB source code.

    The parameter is only supported as a query string, not as a form field submission. Thus if you POST to /_session?next=/somewhere with the form data in the POST body, it will work.

    curl -i https://example.iriscouch.com/_session?next=/stuff -d 'name=me&password=secret'
    HTTP/1.1 302 Moved Temporarily
    Set-Cookie: AuthSession=[cookie value]; Version=1; Path=/; HttpOnly
    Server: CouchDB/1.1.0 (Erlang OTP/R14B03)
    Location: http://example.iriscouch.com/stuff
    Date: Tue, 19 Jul 2011 01:07:52 GMT
    Content-Type: text/plain;charset=utf-8
    Content-Length: 52
    Cache-Control: must-revalidate
    
    {"ok":true,"name":"me","roles":["whoever"]}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app served by cherrypy. Within this app, I would like
The manual at http://couchapp.org/page/couchapp-config says that you can store passwords in ~/.couchapp.conf . However,
I have a two questions about authentication involving CouchDB. The questions are about a
I have a couchapp based on evently. When I push the couchapp and start
I've recently written a web app that uses couchdb . I like couchdb and
What database would you suggest for a startup that might possibly grow very fast?
I've just installed couchapp from the instructions and have gone through the Getting Started
I'm using CouchApp to build an easy web application that allows to upload and
Could someone point me to an example of a Couchapp application that queries a
I have been playing with CouchDB and CouchApp for a little while now. I

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.