From fa4a48c7520f8b2b3c3f7d58f58b40a4609d01e8 Mon Sep 17 00:00:00 2001 From: Nikos Douvlis Date: Wed, 10 Sep 2025 11:54:19 +0300 Subject: [PATCH 1/2] fix(clerk-js,type): Remove `null` from SignIn/SignUp future class `.status` prop --- packages/clerk-js/src/core/resources/SignIn.ts | 3 ++- packages/clerk-js/src/core/resources/SignUp.ts | 3 ++- packages/types/src/signInFuture.ts | 2 +- packages/types/src/signUpFuture.ts | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/clerk-js/src/core/resources/SignIn.ts b/packages/clerk-js/src/core/resources/SignIn.ts index a9693783cfb..cd97eb7545f 100644 --- a/packages/clerk-js/src/core/resources/SignIn.ts +++ b/packages/clerk-js/src/core/resources/SignIn.ts @@ -560,7 +560,8 @@ class SignInFuture implements SignInFutureResource { constructor(readonly resource: SignIn) {} get status() { - return this.resource.status; + // @TODO hooks-revamp: Consolidate this fallback val with stateProxy + return this.resource.status || 'needs_identifier'; } get availableStrategies() { diff --git a/packages/clerk-js/src/core/resources/SignUp.ts b/packages/clerk-js/src/core/resources/SignUp.ts index 4607f7d606d..5b9378587a2 100644 --- a/packages/clerk-js/src/core/resources/SignUp.ts +++ b/packages/clerk-js/src/core/resources/SignUp.ts @@ -540,7 +540,8 @@ class SignUpFuture implements SignUpFutureResource { constructor(readonly resource: SignUp) {} get status() { - return this.resource.status; + // @TODO hooks-revamp: Consolidate this fallback val with stateProxy + return this.resource.status || 'missing_requirements'; } get unverifiedFields() { diff --git a/packages/types/src/signInFuture.ts b/packages/types/src/signInFuture.ts index adf30545af8..0806a08bc01 100644 --- a/packages/types/src/signInFuture.ts +++ b/packages/types/src/signInFuture.ts @@ -95,7 +95,7 @@ export interface SignInFutureResource { * The status of the current sign-in attempt as a string (for example, `'needs_identifier'`, `'needs_first_factor'`, * `'complete'`, etc.) */ - readonly status: SignInStatus | null; + readonly status: SignInStatus; /** * Indicates that there is not a matching user for the first-factor verification used, and that the sign-in can be diff --git a/packages/types/src/signUpFuture.ts b/packages/types/src/signUpFuture.ts index 5260e86aa66..311f6ba1b11 100644 --- a/packages/types/src/signUpFuture.ts +++ b/packages/types/src/signUpFuture.ts @@ -50,7 +50,7 @@ export interface SignUpFutureResource { /** * The status of the current sign-up attempt as a string (for example, `'missing_requirements'`, `'complete'`, `'abandoned'`, etc.) */ - readonly status: SignUpStatus | null; + readonly status: SignUpStatus; /** * An array of strings representing unverified fields such as `’email_address’`. Can be used to detect when verification is necessary. From 2d1495fb9ca690e041abbec5db856ad3f505eb6a Mon Sep 17 00:00:00 2001 From: Nikos Douvlis Date: Tue, 23 Sep 2025 13:14:03 +0300 Subject: [PATCH 2/2] Create nice-moons-repeat.md --- .changeset/nice-moons-repeat.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/nice-moons-repeat.md diff --git a/.changeset/nice-moons-repeat.md b/.changeset/nice-moons-repeat.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/nice-moons-repeat.md @@ -0,0 +1,2 @@ +--- +---