New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix(backend,remix): Issues with v5 and resources loading in request object #2598
Conversation
🦋 Changeset detectedLatest commit: 3e67c84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
}, | ||
{ loadUser: true }, | ||
); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @LekoArts Could you handle adding these changes in clerk-docs?
208fc3b
to
158f721
Compare
…atch signed-in auth object
Options from env re-used in: - getAuth() - authenticateRequest() - decorateObjectWithResources()
f5fad6e
to
dfff4b5
Compare
dfff4b5
to
3e67c84
Compare
import { getAuth } from '@clerk/nextjs/server'; | ||
|
||
- const { user, organization, session } = getAuth(args); | ||
+ const { userId, organizationId, sessionId } = getAuth(req, opts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, did we have getAuth.user
before v5?
Nitpick, but this should probably be on its own changeset targeting nextjs (similar for remix and gatsby)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we had them in v4.
signed-in:
user, |
signed-out:
user: null, |
The change is applied only in the backend package and the changeset will add this change in the changelog of all the packages depending on backend, that's why i didn't add both remix, nextjs, gatsby.
@nikosdouvlis Do we want for each breaking change in backend to also add the other packages?
Description
As part of this PR the following changes were applied:
user
,session
,organization
resources from the SignedOut authObjectuser
,session
,organization
resources in remixremix
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/clerk-expo
@clerk/fastify
gatsby-plugin-clerk
@clerk/localizations
@clerk/nextjs
@clerk/clerk-react
@clerk/remix
@clerk/clerk-sdk-node
@clerk/shared
@clerk/themes
@clerk/types
build/tooling/chore