Skip to content

Make duration of HTTP sessions configurable #10522

Description

@koro666

Feature description

Please make the duration of the sessions generated by HTTP form login configurable, with the option to never expire.

(Additionally, if an easy change while touching this code: please allow configuring the path for the session cookie, as it currently defaults to / which is incorrect if Syncthing is reverse-proxied with a path)

Problem or use case

I switched from HTTP Basic Authentication to form authentication because I was tired of having to login again everytime I restarted my browser. However, even in this situation, I am still presented with a login form about once per week. I would like to log in exactly once and stay forever logged in unless I explicitly clear my cookies.

Alternatives or workarounds

None.

Activity

  1. added
    enhancement
    needs-triage
    on Jan 9, 2026
  2. added theissue type on Jan 9, 2026
  3. calmh commented on Jan 10, 2026

    @calmh
    Member

    Isn't this the "stay logged in" checkbox on the login form?

  4. koro666 commented on Jan 10, 2026

    @koro666
    Author

    That checkbox controls if the cookie is a session cookie or not.

  5. calmh commented on Jan 10, 2026

    @calmh
    Member

    Well we don't set an expire time afaik, so for your use case of not having to log in, that seems to be what we do currently. (Which does the thing for me, I am not asked to log in with that checkbox marked.)

  6. koro666 commented on Jan 10, 2026

    @koro666
    Author

    Just checked with devtools, it does set an expire time. When POSTing to /rest/noauth/auth/password, the response contained the header (with values redacted):

    set-cookie: sessionid-XXXXXXX=...; Path=/; Max-Age=604800; Secure
    
  7. added a commit that references this issue on Apr 26, 2026
    987e631
  8. added a commit that references this issue on Apr 26, 2026
    03a9b13
  9. added a commit that references this issue on Jun 28, 2026
    a4dadaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementneeds-triage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions