Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/two-ways-lose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/clerk-js': patch
'@clerk/shared': patch
---

Fix issue were `sendPhoneCode` method was incorrectly requiring a parameter.
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/SignUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,8 @@ class SignUpFuture implements SignUpFutureResource {
});
}

async sendPhoneCode(params: SignUpFuturePhoneCodeSendParams): Promise<{ error: ClerkError | null }> {
const { channel = 'sms' } = params;
async sendPhoneCode(params?: SignUpFuturePhoneCodeSendParams): Promise<{ error: ClerkError | null }> {
const { channel = 'sms' } = params || {};
return runAsyncResourceTask(this.#resource, async () => {
await this.#resource.__internal_basePost({
body: { strategy: 'phone_code', channel },
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/types/signUpFuture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export interface SignUpFutureVerifications {
/**
* Used to send a phone code to verify a phone number.
*/
sendPhoneCode: (params: SignUpFuturePhoneCodeSendParams) => Promise<{ error: ClerkError | null }>;
sendPhoneCode: (params?: SignUpFuturePhoneCodeSendParams) => Promise<{ error: ClerkError | null }>;

/**
* Used to verify a code sent via phone.
Expand Down