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(remix): Deprecate loadUser, loadSession and loadOrganization on rootAuthLoader #3443

Merged
merged 5 commits into from
May 27, 2024

Conversation

anagstef
Copy link
Member

@anagstef anagstef commented May 24, 2024

Currently, rootAuthLoader types suggest the usage of loadUser, loadSession and loadOrganization boolean options. Using any of these will result to a call to Clerk Backend API on each root loader execution. This results in rate limiting issues for apps with many users and affects scalability.

This PR deprecates these 3 options so that they're not misused.

Relevant issue: #1043

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:

Copy link

changeset-bot bot commented May 24, 2024

🦋 Changeset detected

Latest commit: 150f20f

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

This PR includes changesets to release 1 package
Name Type
@clerk/remix 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

@octoper
Copy link
Member

octoper commented May 24, 2024

🪛 I think it would be better to mark them as deprecated for now and drop them in the next major release of the SDK

@anagstef anagstef force-pushed the stefanos/sdk-1775-rootauthloader-rate-limit branch from 69d05fc to d48eb37 Compare May 24, 2024 17:18
@anagstef anagstef changed the title fix(remix): Remove loadUser, loadSession and loadOrganization from rootAuthLoader fix(remix): Deprecate loadUser, loadSession and loadOrganization on rootAuthLoader May 24, 2024
@anagstef
Copy link
Member Author

anagstef commented May 24, 2024

🪛 I think it would be better to mark them as deprecated for now and drop them in the next major release of the SDK

@octoper Agreed! Just pushed!

Copy link
Member

@octoper octoper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@panteliselef
Copy link
Member

@anagstef @octoper I feel like these should have been removed with the Core 2 launch, was this an oversight on our part ?

@anagstef
Copy link
Member Author

@panteliselef Yes, we should have removed them.

.changeset/hip-pets-run.md Outdated Show resolved Hide resolved
anagstef and others added 2 commits May 27, 2024 13:35
Co-authored-by: George Desipris <73396808+desiprisg@users.noreply.github.com>
@anagstef anagstef merged commit 8529e41 into main May 27, 2024
11 checks passed
@anagstef anagstef deleted the stefanos/sdk-1775-rootauthloader-rate-limit branch May 27, 2024 11:21
@dimkl
Copy link
Contributor

dimkl commented May 29, 2024

I think we should also use the import { deprecated } from "@clerk/shared" to add a deprecation warning in the server logs.
cc: @anagstef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants