@cloudbase/auth 2.26.0 → 2.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -473,6 +473,9 @@ class Auth {
473
473
  params: authModels.GetVerificationRequest,
474
474
  options?: { withCaptcha: boolean },
475
475
  ): Promise<authModels.GetVerificationResponse> {
476
+ if (params.phone_number) {
477
+ params.phone_number = this.formatPhone(params.phone_number)
478
+ }
476
479
  return this.oauthInstance.authApi.getVerification(params, options)
477
480
  }
478
481
 
@@ -1390,6 +1393,7 @@ class Auth {
1390
1393
  */
1391
1394
  async signUp(params: authModels.SignUpRequest & { phone?: string }): Promise<SignUpRes> {
1392
1395
  if (params.phone_number || params.verification_code || params.verification_token || params.provider_token) {
1396
+ params.phone_number = this.formatPhone(params.phone_number)
1393
1397
  await this.oauthInstance.authApi.signUp(params)
1394
1398
  return this.createLoginState() as any
1395
1399
  }