Hello! When upgrading the latest version of ory wi...
# ory-network
c
Hello! When upgrading the latest version of ory with the Go SDK, the sessions are rejected on whoami. Request 2828f025-9491-90ec-bc39-15cbff831131. It there something that changed? It returns No valid session credentials found in the request.
👀 1
m
Hey @careful-pager-12918 I don't think the SDK upgrade caused this. Nothing in the Go SDK has changed how whoami builds its request in over a year. Can you send request details to [email protected] please? Please include hich version you upgraded from and the exact details of your ToSession call with secrets redacted Also check whether the affected identities could have been deactivated: since 14 October, deactivating an identity revokes all its sessions; so that is a somewhat new change.
some common causes @careful-pager-12918 1. Only the cookie value is forwarded, not the full Cookie header (name=value). 2. Cookie(...) or .XSessionToken(...) got lost in the refactor around the upgrade. 3. The SDK now points at a different project than the one that issued the session. 4. A context carrying the project API key is reused with no session set, so the key gets checked as a session token.
c
Hi Vincent, I will verify these causes. Nothing changed on our code unless the Go SDK version.
🤔 1
We were a bit late on this upgrade but we upgraded from client-go v1.4.7 to v1.22.83. • `client-go v1.22.83`: Ory returns “No valid session credentials.” • `client-go v1.4.7`: the same login and backend code return 200. I also checked the 4 points and they are all fine.
m
Gotcha. If it's still doesn't resolve please reach out to [email protected] as I described above and we'll take a deeper look.
c
I also ran cursor on these to see if I could miss something, here is the result : 1. We forward the full raw header:
req.Header.Get("Cookie")
→
.Cookie(cookies)
. 2.
.Cookie(cookies)
is present in
ValidateSessionCookie
. 3. The server URL is explicitly built from the same `ory-project-slug`; rollback changed no configuration. 4.
ValidateSessionCookie
uses the request context directly.
contextWithApiKey
is only called by admin operations.
Thanks @magnificent-energy-493 I will reach out through [email protected]
🙏 1