Repository navigation
Conversation
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50. Or wait 38 minutes for your next included review. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
@netlify/ai
@netlify/aws-lambda-compat
@netlify/blobs
@netlify/cache
@netlify/dev
@netlify/dev-utils
@netlify/headers
@netlify/images
@netlify/otel
@netlify/redirects
@netlify/runtime
@netlify/runtime-utils
@netlify/static
@netlify/types
@netlify/database-dev
@netlify/database
@netlify/database-proxy
@netlify/edge-functions-dev
@netlify/edge-functions
@netlify/functions-dev
@netlify/functions
@netlify/identity
@netlify/server-dev
@netlify/server
commit: |
7befa0d to
a196830
Compare
Summary
getUser()sentnetlifyIdentityContext.tokento GoTrue'sGET /user. That token is the operator token thatadmin.tsandgetIdentityConfiguse for admin calls, not the user's JWT. GoTrue's/userlooks the user up by the token'ssub(UserGetin netlify/gotrue), so the request failed andgetUser()always fell back to the context's claims instead of returning the full user.nf_jwtcookie. When there is no cookie, or the cookie belongs to a different user than the context's verified claims, it skips the request and returns the claims, as it did before in effect.The existing tests used a user JWT as the context token, so two of them now set an
nf_jwtcookie and an operator token instead.Test plan
npx vitest runinpackages/identity/prod: 185 passed. Four of the new tests fail againstmain.