Skip to content

[BUG] Change cookie name #155

Closed
Closed

Description

@ptath

Describe the bug
We really need the ability to change cookie name, and that's why

To Reproduce
Steps to reproduce the behavior:

  1. Create tinyauth.d1.com and so on, everything fine
  2. Create another instance on another machine tinyauth.s1.d1.com and it looks fine but
  3. Now we have (in browser) 2 cookies with arbitrary name tinyauth and distinguished Domain fields (.d1.com and .s1.d1.com)
  4. Root (d1.com) works fine, but s1.d1.com can't login, after user/pass or oidc just redirects to login page and
tinyauth           | 2025-05-19T22:11:44Z ERR Failed to get session error="securecookie: the value is not valid"
tinyauth           | 2025-05-19T22:11:44Z ERR Failed to get session error="securecookie: the value is not valid"
tinyauth           | 2025-05-19T22:11:44Z ERR Failed to get session cookie error="securecookie: the value is not valid"

Expected behavior
Just works

Additional context
Manual removing cookies helps till login to both d1.com and s1.d1.com, then only first one works. I'm really not sure but suppose that problem should gone if cookie name will differ.

Activity

  1. steveiliop56 commented on May 20, 2025

    @steveiliop56
    Member

    Hello!

    Never thought of this and that's indeed an issue. I will dynamically generate a cookie name based on either the domain or the secret. Basically a static unique identifier for the cookie. Will include it in the next release!

  2. modified the milestones: v3.3.0, v3.4.0 on May 20, 2025
  3. moved this to Backlog in Tinyauthon May 22, 2025
  4. moved this from Backlog to In progress in Tinyauthon May 22, 2025
  5. steveiliop56 commented on May 25, 2025

    @steveiliop56
    Member

    Added in #161

  6. moved this from In progress to Done in Tinyauthon May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpinnedThis issue is pinned

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions