Skip to content

Adaptive Content Auth Failure: Unexpected Duplicate gitbook-visitor-token Cookie Created #3859

@Saksham573001

Description

@Saksham573001

Bug description

I am currently implementing GitBook Adaptive Content (Visitor Authentication) for my documentation hosted at doc.avaamo.com. My implementation involves sending the gitbook-visitor-token via cookies to authenticate users.

The Issue: Unexpectedly, a second, separate cookie is being generated on the specific domain doc.avaamo.com.

Intended Behavior: The browser should retain the gitbook-visitor-token I set (containing the signed JWT).

Observed Behavior: A duplicate cookie with the same name (or similar name pattern) and a generic UUID value is automatically created on the subdomain.

Impact: GitBook prioritizes this auto-generated cookie over the valid authentication token. As a result, visitor authentication fails.

Troubleshooting Performed:

I confirmed that if I manually delete the unexpected "UUID" cookie via browser dev tools, GitBook correctly picks up the valid token and authentication works as expected.

I have verified that my application logic is not generating this second cookie.

Environment:

Domain: doc.avaamo.com

Auth Method: Adaptive Content via Cookies (gitbook-visitor-token)

Image

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions