-
Notifications
You must be signed in to change notification settings - Fork 391
fix(vue): Prevent boolean prop coercion for SignIn component props #6935
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
Conversation
🦋 Changeset detectedLatest commit: 53ca573 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdated the Vue SignIn component to use withDefaults around defineProps for SignInProps, setting default values of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/vue/src/components/ui-components/SignIn.vue (1)
8-11
: Approve SignIn.vue boolean props handling
- withDefaults in SignIn.vue correctly prevents coercion of
transferable
andwithSignUp
, preserving clerk-js defaults (true
fortransferable
).- GoogleOneTap.vue already applies the same pattern.
- Audit other Vue UI components under packages/vue/src/components/ui-components using defineProps without withDefaults and add
undefined
defaults for their boolean props.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/vue/src/components/ui-components/SignIn.vue
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: semgrep/ci
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: Analyze (javascript-typescript)
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
Description
We have an issue (slack convo) where signing in via OAuth with an email that doesn't exist leads to a "External account not found" error instead of being transferred to the sign up flow.
The issue is that the
transferable
prop defaults totrue
in our clerk-js components, but Vue casts Boolean props without default value tofalse
. We need to set a default value ofundefined
for it to use whatever default value is in our clerk-js package. This issue is similar to #6809.From https://vuejs.org/guide/components/props
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit
Bug Fixes
Refactor
Chores
Compatibility