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

feat(clerk-js,types): Navigate to session task on after sign-in/sign-up #5187

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Feb 17, 2025

Description

Resolves ORGS-562

This PR introduces the redirection behavior after sign-in/sign-up if the session has pending tasks to be solved.

  • Displays the current pending session task as SignIn/SignUp routes
  • Introduce navigation to tasks after sign-in/sign-up

Developer flows

For AIO components, it'll work out of the box. Just rendering <SignIn /> and <SignUp /> will work, since the task gets appended to the routing path and displayed within each component.

For custom flows, no manual changes are needed to trigger navigation, however, the developer has to handle rendering the OrganizationSwitcher on the tasks route.

Checklist

  • pnpm test runs as expected.
  • pnpm 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:

@LauraBeatris LauraBeatris self-assigned this Feb 17, 2025
Copy link

changeset-bot bot commented Feb 17, 2025

🦋 Changeset detected

Latest commit: 6aff862

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

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Patch
@clerk/types Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/ui Patch
@clerk/vue 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

Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 5:25am

@LauraBeatris LauraBeatris changed the title [wip] feat(clerk-js): Display pending tasks on SignIn/SignUp [wip] chore(clerk-js): Display pending tasks on SignIn/SignUp Feb 17, 2025
@LauraBeatris LauraBeatris force-pushed the introduce-session-tasks-types branch from e2e02ec to aa2c20a Compare February 18, 2025 16:26
Base automatically changed from introduce-session-tasks-types to main February 18, 2025 16:35
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 59a2b22 to e836ee1 Compare February 18, 2025 16:39
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 62a62ae to 639e7f8 Compare February 18, 2025 21:13
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 755c683 to 4a6e892 Compare February 18, 2025 22:45
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 4a6e892 to a1c1c39 Compare February 18, 2025 23:26
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch 2 times, most recently from d27d8c9 to 104791b Compare February 18, 2025 23:31
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 104791b to 48191f1 Compare February 19, 2025 01:21
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 48191f1 to d74f3e7 Compare February 19, 2025 01:28
@@ -197,7 +198,7 @@ export interface PublicUserData {
}

export interface SessionTask {
key: 'orgs';
Copy link
Member Author

Choose a reason for hiding this comment

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

FAPI was previously returning orgs but it got updated to org

@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 01855f8 to b9f8870 Compare February 25, 2025 22:18
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 6f6440a to 0a1d36d Compare February 26, 2025 19:48
@LauraBeatris LauraBeatris changed the title feat(clerk-js,types): Navigate to session tasks feat(clerk-js,types): Navigate to session tasks on after sign-in/sign-up Feb 26, 2025
@LauraBeatris LauraBeatris changed the title feat(clerk-js,types): Navigate to session tasks on after sign-in/sign-up feat(clerk-js,types): Navigate to session task on after sign-in/sign-up Feb 26, 2025
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 0a1d36d to efed656 Compare February 26, 2025 20:15
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from efed656 to 38fbf11 Compare February 26, 2025 20:38
@LauraBeatris LauraBeatris force-pushed the laura/tasks-sign-sign-up-routes branch from 38fbf11 to a9de536 Compare February 26, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants