diff --git a/.changeset/sign-up-future-create-channel.md b/.changeset/sign-up-future-create-channel.md new file mode 100644 index 00000000000..f46d67778a0 --- /dev/null +++ b/.changeset/sign-up-future-create-channel.md @@ -0,0 +1,5 @@ +--- +'@clerk/shared': minor +--- + +`SignUpFuture.create()` accepts a `channel`. Pass it with `strategy: 'phone_code'` and a `phoneNumber` to create the sign-up and send the verification code over that channel, such as `'whatsapp'`, in a single request instead of calling `SignUpFuture.verifications.sendPhoneCode()` afterwards. diff --git a/.changeset/sign-up-future-update-password.md b/.changeset/sign-up-future-update-password.md new file mode 100644 index 00000000000..c782b10c2aa --- /dev/null +++ b/.changeset/sign-up-future-update-password.md @@ -0,0 +1,5 @@ +--- +'@clerk/shared': minor +--- + +`SignUpFuture.update()` accepts a `password`, so a custom flow can set the password on a sign-up that was created without one, such as one started from an invitation. diff --git a/packages/shared/src/types/signUpFuture.ts b/packages/shared/src/types/signUpFuture.ts index 479044078c4..8e63012d128 100644 --- a/packages/shared/src/types/signUpFuture.ts +++ b/packages/shared/src/types/signUpFuture.ts @@ -65,6 +65,10 @@ export interface SignUpFutureCreateParams extends SignUpFutureAdditionalParams { | GoogleOneTapStrategy | AppleIdTokenStrategy | PhoneCodeStrategy; + /** + * The mechanism to use to send the code to `phoneNumber` when `strategy` is `'phone_code'`. The sign-up is created and the code is sent in the same request. Defaults to `'sms'`. + */ + channel?: PhoneCodeChannel; /** * Optional per-attempt Slack workspace hint. Only supported with the `oauth_slack` strategy. */ @@ -121,6 +125,10 @@ export interface SignUpFutureUpdateParams extends SignUpFutureAdditionalParams { * The user's username. Only supported if [username](https://clerk.com/docs/guides/configure/auth-strategies/sign-up-sign-in-options#username) is enabled in the instance settings. */ username?: string; + /** + * The user's password. [Password](https://clerk.com/docs/guides/configure/auth-strategies/sign-up-sign-in-options#password) must be enabled in the instance settings. + */ + password?: string; } /** @generateWithEmptyComment */