Conversation
ee9cf84 to
3775292
Compare
a917c67 to
d7faad4
Compare
d7faad4 to
af660a8
Compare
dimkl
approved these changes
Dec 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
mainis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonmain.Releases
@clerk/[email protected]
Major Changes
Remove the named
Clerkimport from@clerk/backendand importcreateClerkClientinstead. The latter is a factory method that will create a Clerk client instance for you. This aligns usage across our SDKs and will enable us to better ship DX improvements in the future. (#2317) by @tmilewskiInside your code, search for occurrences like these:
You need to rename the import from
ClerktocreateClerkClientand change its usage:Refactor the
authenticateRequest()flow to use the new client handshake endpoint. This replaces the previous "interstitial"-based flow. This should improve performance and overall reliability of Clerk's server-side request authentication functionality. (#2300) by @BRKalowauthenticateRequest()now accepts two arguments, aRequestobject to authenticate and options:Minor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
896cb6104,75ea300bc]:@clerk/[email protected]
Major Changes
Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
Expand the ability for
@clerk/chrome-extensionWebSSO to sync with host applications which use URL-based session syncing. (#2277) by @tmilewskiHow to Update
WebSSO Host Permissions:
Local Development: You must have your explicit development domain added to your
manifest.jsonfile in order to use the WebSSO flow.Example:
{ "host_permissions": [ // ... "http://localhost" // ... ] }Production: You must have your explicit Clerk Frontend API domain added to your
manifest.jsonfile in order to use the WebSSO flow.Example:
{ "host_permissions": [ // ... "https://clerk.example.com" // ... ] }WebSSO Provider settings:
WebSSO Storage Cache Interface:
With the prop change from
tokenCachetostorageCache, the interface has been expanded to allow for more flexibility.The new interface is as follows:
Minor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
69ce3e185,896cb6104,8aea39cd6,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
Drop
redirectToHomeredirect method in favour ofredirectToAfterSignUporredirectToAfterSignIn. (#2251) by @octoperWhen the
<SignIn/>and<SignUp/>components are rendered while a user is already logged in, they will now redirect to the configuredafterSignInandafterSignUpURLs, respectively. Previously, the redirect URL was set to the home URL configured in the dashboard.Minor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
Update
@zxcvbn-ts/corefrom2.2.1to3.0.4. Update@zxcvbn-ts/language-commonfrom3.0.2to3.0.4. (#2326) by @LekoArtsAdd
useAssertWrappedByClerkProviderto internal code. If you use hooks likeuseAuthoutside of the<ClerkProvider />context an error will be thrown. For example: (#2299) by @tmilewskiUpdated dependencies [
896cb6104,69ce3e185,ab4eb56a5,46040a2f3,75ea300bc,370b17b12,844847e0b]:@clerk/[email protected]
Major Changes
Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
Patch Changes
69ce3e185,896cb6104,8aea39cd6,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
(Note: This is only relevant if, in the unlikely case, you are using
Clerkfrom@clerk/fastifydirectly. If not, you can safely ignore this change.) (#2317) by @tmilewskiRemove the named
Clerkimport from@clerk/fastifyand importcreateClerkClientinstead. The latter is a factory method to create a Clerk client instance for you. This update aligns usage across our SDKs and will enable us to ship DX improvements better in the future.You need to rename the import from
ClerktocreateClerkClientand change its usage:Patch Changes
896cb6104,02976d494,69ce3e185,86d52fb5c,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:[email protected]
Major Changes
Remove the named
Clerkimport fromgatsby-plugin-clerkand importcreateClerkClientinstead. The latter is a factory method to create a Clerk client instance for you. This update aligns usage across our SDKs and will enable us to ship DX improvements better in the future. (#2317) by @tmilewskiInside your code, search for occurrences like these:
You need to rename the import from
ClerktocreateClerkClientand change its usage:Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
Patch Changes
02976d494,02976d494,8aea39cd6,86d52fb5c,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
(Note: This is only relevant if, in the unlikely case, you are using
Clerkfrom@clerk/nextjsdirectly. If not, you can safely ignore this change.) (#2317) by @tmilewskiRemove the named
Clerkimport from@clerk/nextjsand importcreateClerkClientinstead. The latter is a factory method to create a Clerk client instance for you. This update aligns usage across our SDKs and will enable us to ship DX improvements better in the future.You need to rename the import from
ClerktocreateClerkClientand change its usage:Minor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
Update NextJS quickstart link in error message (#2355) by @dimkl
Accept
redirectUrlas an option forauth().protect(). (#2329) by @panteliselefFor example:
Updated dependencies [
896cb6104,02976d494,8aea39cd6,86d52fb5c,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
Drop
redirectToHomeredirect method in favour ofredirectToAfterSignUporredirectToAfterSignIn. (#2251) by @octoperWhen the
<SignIn/>and<SignUp/>components are rendered while a user is already logged in, they will now redirect to the configuredafterSignInandafterSignUpURLs, respectively. Previously, the redirect URL was set to the home URL configured in the dashboard.Align return types for redirectTo* methods in ClerkJS SDK-1037 by @tmilewski
Breaking Changes:
redirectToUserProfilenow returnsPromise<unknown>instead ofvoidredirectToOrganizationProfilenow returnsPromise<unknown>instead ofvoidredirectToCreateOrganizationnow returnsPromise<unknown>instead ofvoidredirectToHomenow returnsPromise<unknown>instead ofvoidMinor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
Add
useAssertWrappedByClerkProviderto internal code. If you use hooks likeuseAuthoutside of the<ClerkProvider />context an error will be thrown. For example: (#2299) by @tmilewskiUpdated dependencies [
896cb6104,69ce3e185,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
Introduce
@clerk/clerk-react/errorsand@clerk/clerk-react/internalsubpath exports to expose some internal utilities. Eg (#2328) by @dimklDrop from the
@clerk/clerk-reactand all other clerk-react wrapper packages:__internal__setErrorThrowerOptionsinternal utility (moved to /internal subpath)WithClerkProptypeMultisessionAppSupportcomponent (moved to /internal subpath)EmailLinkErrorCodeenumDrop
StructureContextand related errors to reduce to reduce code complexity since it seems that it was not being used.Drop
withUser,WithUser,withClerkHOFs andWithClerk,withSession,WithSessionHOCs from the@clerk/clerk-reactto reduce the export surface since it's trivial to implement if needed.
(Note: This is only relevant if, in the unlikely case, you are using
Clerkfrom@clerk/remixdirectly. If not, you can safely ignore this change.) (#2317) by @tmilewskiRemove the named
Clerkimport from@clerk/remixand importcreateClerkClientinstead. The latter is a factory method to create a Clerk client instance for you. This update aligns usage across our SDKs and will enable us to ship DX improvements better in the future.You need to rename the import from
ClerktocreateClerkClientand change its usage:Patch Changes
896cb6104,02976d494,8aea39cd6,86d52fb5c,ab4eb56a5,46040a2f3,75ea300bc,844847e0b]:@clerk/[email protected]
Major Changes
(Note: This is only relevant if, in the unlikely case, you are using
Clerkfrom@clerk/clerk-sdk-nodedirectly. If not, you can safely ignore this change.) (#2317) by @tmilewskiRemove the named
Clerkimport from@clerk/clerk-sdk-nodeand importcreateClerkClientinstead. The latter is a factory method to create a Clerk client instance for you. This update aligns usage across our SDKs and will enable us to ship DX improvements better in the future.You need to rename the import from
ClerktocreateClerkClientand change its usage:Patch Changes
896cb6104,02976d494,86d52fb5c,46040a2f3,75ea300bc]:@clerk/[email protected]
Major Changes
Align return types for redirectTo* methods in ClerkJS SDK-1037 by @tmilewski
Breaking Changes:
redirectToUserProfilenow returnsPromise<unknown>instead ofvoidredirectToOrganizationProfilenow returnsPromise<unknown>instead ofvoidredirectToCreateOrganizationnow returnsPromise<unknown>instead ofvoidredirectToHomenow returnsPromise<unknown>instead ofvoidMinor Changes
Introduce Protect for authorization. (#2170) by @panteliselef
Changes in public APIs:
experimentaltags and prefixessomefrom thehasutility and Protect. Protect now accepts aconditionprop where a function is expected with thehasbeing exposed as the param.<SignedIn>, if no authorization props are passed.haswill throw an error if neitherpermissionorroleis passed.auth().protect()for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.not-foundcomponent set by the developerPatch Changes
Adjust
ZxcvbnResultinterface to use currentfeedback.warningtype as used in the upstream@zxcvbn-ts/corelibrary. (#2326) by @LekoArtsDrop
redirectToHomeredirect method in favour ofredirectToAfterSignUporredirectToAfterSignIn. (#2251) by @octoperWhen the
<SignIn/>and<SignUp/>components are rendered while a user is already logged in, they will now redirect to the configuredafterSignInandafterSignUpURLs, respectively. Previously, the redirect URL was set to the home URL configured in the dashboard.@clerk/[email protected]
Patch Changes
@clerk/[email protected]
Patch Changes
Add
react-domtopeerDependenciesMetakey insidepackage.json(#2322) by @LekoArtsAdd
useAssertWrappedByClerkProviderto internal code. If you use hooks likeuseAuthoutside of the<ClerkProvider />context an error will be thrown. For example: (#2299) by @tmilewski