Skip to content
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

Merged
merged 4 commits into from Jan 16, 2024

Conversation

dimkl
Copy link
Member

@dimkl dimkl commented Jan 16, 2024

Description

As part of this PR the following changes were applied:

  • Dropped user, session, organization resources from the SignedOut authObject
  • Fix setting the user, session, organization resources in remix remix

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

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

@dimkl dimkl self-assigned this Jan 16, 2024
Copy link

changeset-bot bot commented Jan 16, 2024

🦋 Changeset detected

Latest commit: 3e67c84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@clerk/backend Major
@clerk/remix Patch
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/clerk-sdk-node Patch
@clerk/elements Patch

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 },
);
```
Copy link
Member Author

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?

@dimkl dimkl added this pull request to the merge queue Jan 16, 2024
Comment on lines +35 to +38
import { getAuth } from '@clerk/nextjs/server';

- const { user, organization, session } = getAuth(args);
+ const { userId, organizationId, sessionId } = getAuth(req, opts);
Copy link
Member

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)

Copy link
Member Author

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:


signed-out:

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?

Merged via the queue into main with commit 3a2f136 Jan 16, 2024
7 checks passed
@dimkl dimkl deleted the dimkl/fix-remix-user-null branch January 16, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants