ci(changesets): version packages #710
Merged
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.
Releases
@voltagent/[email protected]
Patch Changes
#709
8b838ecThanks @omeraplak! - feat: add defaultPrivate option to AuthProvider for protecting all routes by defaultThe Problem
When using VoltAgent with third-party auth providers (like Clerk, Auth0, or custom providers), custom routes added via
configureAppwere public by default. This meant:PROTECTED_ROUTESrequired authenticationpublicRoutesproperty couldn't make all routes private by defaultThis was especially problematic when integrating with enterprise auth systems where security-by-default is expected.
The Solution
Added
defaultPrivateoption toAuthProviderinterface, enabling two authentication modes:defaultPrivate: false): Only specific routes require authdefaultPrivate: true): All routes require auth unless explicitly listed inpublicRoutesUsage Example
Protecting All Routes with Clerk
Default Behavior (Backward Compatible)
Benefits
publicRoutesto selectively allow access@voltagent/[email protected]
Patch Changes
#709
8b838ecThanks @omeraplak! - feat: add defaultPrivate option to AuthProvider for protecting all routes by defaultThe Problem
When using VoltAgent with third-party auth providers (like Clerk, Auth0, or custom providers), custom routes added via
configureAppwere public by default. This meant:PROTECTED_ROUTESrequired authenticationpublicRoutesproperty couldn't make all routes private by defaultThis was especially problematic when integrating with enterprise auth systems where security-by-default is expected.
The Solution
Added
defaultPrivateoption toAuthProviderinterface, enabling two authentication modes:defaultPrivate: false): Only specific routes require authdefaultPrivate: true): All routes require auth unless explicitly listed inpublicRoutesUsage Example
Protecting All Routes with Clerk
Default Behavior (Backward Compatible)
Benefits
publicRoutesto selectively allow access5a0728dThanks @omeraplak! - fix: correct CORS middleware detection to use actual function name 'cors2'Fixed a critical bug where custom CORS middleware was not being properly detected, causing both custom and default CORS to be applied simultaneously. This resulted in the default CORS (
origin: "*") overwriting custom CORS headers on actual POST/GET requests, while OPTIONS (preflight) requests worked correctly.The Problem
The middleware detection logic was checking for
middleware.name === "cors", but Hono's cors middleware function is actually named"cors2". This caused:userConfiguredCorsstayedfalseapp.use("*", cors())) was applied even when users configured custom CORS"*"*) ❌The Solution
Updated the detection logic to check for the actual function name:
Now when users configure custom CORS in
configureApp, it's properly detected and default CORS is skipped entirely.Impact
Example
This now works as expected:
Both OPTIONS and POST requests now return:
Access-Control-Allow-Origin: http://localhost:3001✅Access-Control-Allow-Credentials: true✅Updated dependencies [
8b838ec]: