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 @@ +--- +--- diff --git a/packages/clerk-js/src/core/resources/SignIn.ts b/packages/clerk-js/src/core/resources/SignIn.ts index 849774f9fc7..179a092a2fb 100644 --- a/packages/clerk-js/src/core/resources/SignIn.ts +++ b/packages/clerk-js/src/core/resources/SignIn.ts @@ -608,7 +608,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 61bd6cec668..b76cb7fe4ca 100644 --- a/packages/clerk-js/src/core/resources/SignUp.ts +++ b/packages/clerk-js/src/core/resources/SignUp.ts @@ -551,7 +551,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 7b49ecae111..b095a1fe170 100644 --- a/packages/types/src/signInFuture.ts +++ b/packages/types/src/signInFuture.ts @@ -132,7 +132,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 f9c647e3ff6..d678dc4c7a7 100644 --- a/packages/types/src/signUpFuture.ts +++ b/packages/types/src/signUpFuture.ts @@ -66,7 +66,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.