Uh oh!
There was an error while loading. Please reload this page.
feat(clerk-js,types): Navigate to session task on after sign-in/sign-up - #5187
feat(clerk-js,types): Navigate to session task on after sign-in/sign-up#5187LauraBeatris wants to merge 21 commits into
Conversation
🦋 Changeset detectedLatest commit: be6c67e The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 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 ↗︎
|
SignIn/SignUpSignIn/SignUpe2e02ec to
aa2c20aCompare59a2b22 to
e836ee1Compare62a62ae to
639e7f8Compare755c683 to
4a6e892Compare4a6e892 to
a1c1c39Compared27d8c9 to
104791bCompare104791b to
48191f1Compare48191f1 to
d74f3e7Compare| } | ||
| export interface SessionTask { | ||
| key: 'orgs'; |
There was a problem hiding this comment.
FAPI was previously returning orgs but it got updated to org
d74f3e7 to
08a8affCompare3032ea7 to
4a59b37Compare4a59b37 to
1120aa0Compare| export interface SessionTask { | ||
| key: 'orgs'; | ||
| key: 'org'; |
There was a problem hiding this comment.
is scope a better name ? or does key represent something else ?
Previously, all session statuses were leading to a redirect to after sign-in URL Now, when the session gets set with a `pending` status, it won't redirect to after sign in URL, but instead display the pending task route
| import { testAgainstRunningApps } from '../testUtils'; | ||
| // TODO ORGS-566 - write integration tests for after-auth flow | ||
| testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('after-auth flows @generic @nextjs', () => { |
There was a problem hiding this comment.
This is just a placeholder for me to come back later which is helpful to visualize the redirection behavior introduced in this PR
The reason integration tests aren't being implemented is that FAPI changes for that are under development and it could break CI
LauraBeatris
commented
Mar 4, 2025
I'm opening another PR for this as it became stale and I want to validate other approaches for in-component navigation |
Description
Resolves ORGS-562
This PR introduces the redirection behavior after sign-in/sign-up if the session has pending tasks to be solved.
SignIn/SignUproutesDeveloper 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 respective component on the task route, such as
OrganizationSwitcherThe next PR will introduce a custom URL for customing the task route path to eject out of AIO components, eg: Instead of
sign-in/select-organization-onboarding/select-organizationChecklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change