-
Notifications
You must be signed in to change notification settings - Fork 370
chore(clerk-react,vue,nextjs): Introduce <RedirectToTask />
component
#6416
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: dbe6b31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 Git ↗︎ 1 Skipped Deployment
|
26d308b
to
211922a
Compare
<RedirectToTask />
component<RedirectToTask />
component
211922a
to
5f5e065
Compare
📝 WalkthroughWalkthroughA new component named Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@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: |
08f93b9
to
6ea967e
Compare
6ea967e
to
17e2406
Compare
17e2406
to
6c4bd5d
Compare
6c4bd5d
to
3faf5ac
Compare
3faf5ac
to
bd78fab
Compare
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.
How come we don't add something to auth.protect()
similar the unauthenticatedUrl
that we offer ? Feels weird that we need to redirect to the signInUrl only to be redirected somewhere else.
I've talked with @panteliselef about this comment There's still room for improvement on the DX for the tasks resolution page. We could provide a component that would play nicely with a catchall route: <ClerkProvider taskUrls={{ root: '/onboarding', 'select-organization': '/onboarding/select-organization' }} />
// app/onboarding/page.tsx
export default function OnboardingPage(){
return <PendingTask />
} I'll think more about this flow later. Will merge this PR for now to unblock the after-auth release and update the docs with it. |
Description
Introduce a
<RedirectToTask />
component to be used on root/{signInUrl}/tasks
pages.If an app, using
auth.protect()
has a custom sign-in page (not using<SignIn />
), it must create a pge for the/tasks
route in whichauth.protect()
redirects to on pending session status.On that page, it should redirect to where tasks are resolved with
<RedirectToTask />
- it'll either usetaskUrls
or default to theClerk.signInUrl
Caveats:
It's not possible to customize the
/tasks
path atm. We'll cover that use case on the next iteration.Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit