Skip to content

check auth token when getting user#273

Open
RayBB wants to merge 1 commit intointernetarchive:masterfrom
RayBB:patch-1
Open

check auth token when getting user#273
RayBB wants to merge 1 commit intointernetarchive:masterfrom
RayBB:patch-1

Conversation

@RayBB
Copy link

@RayBB RayBB commented Feb 4, 2026

Blocking: internetarchive/openlibrary#11815

Before this pull request, when fetching a user we first checked whether a cookie was set. The purpose of that check wasn’t to use the cookie itself, but simply to avoid making a user request when no authentication information was present.

In practice, though, we never use the cookie after that check. Authentication actually relies on an auth token that’s already attached to the connection, and that token may have originally come from a cookie earlier in the flow.

This becomes a problem in the FastAPI code path: web.cookie is not set there, so the cookie check fails, even though the auth token is present and valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant