@cloudbase/auth 2.24.2 → 2.24.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/auth",
3
- "version": "2.24.2",
3
+ "version": "2.24.4",
4
4
  "description": "cloudbase javascript sdk auth componets",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -32,14 +32,14 @@
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
34
  "@cloudbase/adapter-wx_mp": "^1.2.1",
35
- "@cloudbase/oauth": "2.24.2",
36
- "@cloudbase/utilities": "2.24.2"
35
+ "@cloudbase/oauth": "2.24.4",
36
+ "@cloudbase/utilities": "2.24.4"
37
37
  },
38
38
  "devDependencies": {
39
- "@cloudbase/types": "2.24.2",
39
+ "@cloudbase/types": "2.24.4",
40
40
  "@types/node": "^22.1.0",
41
41
  "terser-webpack-plugin": "^3.0.2",
42
42
  "webpack-bundle-analyzer": "^4.9.1"
43
43
  },
44
- "gitHead": "7f79aaf12638c890668930555aff1de2434fcdc0"
44
+ "gitHead": "0ed2db6f5ae375751eab9dd5d736b1cf8ebcdcc3"
45
45
  }
package/src/sbaseApi.ts CHANGED
@@ -193,6 +193,10 @@ export class SbaseApi {
193
193
  * @returns Promise<SignUpRes>
194
194
  */
195
195
  async signUp(params: authModels.SignUpRequest): Promise<SignUpRes> {
196
+ if (params.phone_number || params.verification_code || params.verification_token || params.provider_token) {
197
+ await this.oauthInstance.authApi.signUp(params)
198
+ return this.createLoginState() as any
199
+ }
196
200
  try {
197
201
  // 参数校验:email或phone必填其一
198
202
  this.validateAtLeastOne(params, [['email'], ['phone']], 'You must provide either an email or phone number')