@cloudbase/auth 3.1.8 → 3.1.9

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.
@@ -4,6 +4,7 @@ import type { ICloudbaseRequest } from '@cloudbase/types/request';
4
4
  import type { ICloudbaseAuthConfig, IUser, ILoginState } from '@cloudbase/types/auth';
5
5
  import type { AuthOptions, Credentials } from '@cloudbase/oauth';
6
6
  import { CloudbaseOAuth, AuthError, authModels } from '@cloudbase/oauth';
7
+ import { AuthV1Compat, WeixinAuthProvider, CustomAuthProvider, AnonymousAuthProvider } from './v1-compat';
7
8
  import { CommonRes, DeleteMeReq, GetClaimsRes, GetUserIdentitiesRes, GetUserRes, LinkIdentityReq, LinkIdentityRes, OnAuthStateChangeCallback, ReauthenticateRes, ResendReq, ResendRes, ResetPasswordForEmailRes, ResetPasswordForOldReq, SetSessionReq, SignInAnonymouslyReq, SignInOAuthRes, SignInRes, SignInWithIdTokenReq, SignInWithOAuthReq, SignInWithOtpReq, SignInWithOtpRes, SignInWithPasswordReq, SignUpRes, UnlinkIdentityReq, UpdateUserReq, UpdateUserWithVerificationRes, VerifyOAuthReq, VerifyOAuthRes, VerifyOtpReq } from './type';
8
9
  export type { SignInRes, GetUserRes, CommonRes, SignInWithOtpRes, SignInOAuthRes, GetClaimsRes, ResetPasswordForEmailRes, GetUserIdentitiesRes, LinkIdentityRes, ReauthenticateRes, ResendRes, UpdateUserWithVerificationRes, OnAuthStateChangeCallback, SignInWithPasswordReq, SignInWithIdTokenReq, SignInWithOAuthReq, VerifyOAuthReq, VerifyOtpReq, LinkIdentityReq, UnlinkIdentityReq, UpdateUserReq, SignInWithOtpReq, ResetPasswordForOldReq, ResendReq, SetSessionReq, DeleteMeReq, SignUpRes, } from './type';
9
10
  interface UserInfo {
@@ -79,7 +80,7 @@ interface IAuthConfig extends ICloudbaseAuthConfig {
79
80
  request?: ICloudbaseRequest;
80
81
  runtime?: string;
81
82
  }
82
- declare class Auth {
83
+ declare class Auth extends AuthV1Compat {
83
84
  readonly config: IAuthConfig;
84
85
  oauthInstance: CloudbaseOAuth;
85
86
  readonly cache: ICloudbaseCache;
@@ -249,7 +250,7 @@ declare class Auth {
249
250
  signInWithPhoneAuth({ phoneCode }: {
250
251
  phoneCode?: string;
251
252
  }): Promise<SignInRes>;
252
- private formatPhone;
253
+ protected formatPhone(phone: string): string;
253
254
  private notifyListeners;
254
255
  private setupListeners;
255
256
  private convertToUser;
@@ -275,5 +276,5 @@ export declare function generateAuthInstance(config: TInitAuthOptions & {
275
276
  authInstance: Auth;
276
277
  oauthInstance: CloudbaseOAuth;
277
278
  };
278
- export { UserInfo, Auth };
279
+ export { UserInfo, Auth, WeixinAuthProvider, CustomAuthProvider, AnonymousAuthProvider };
279
280
  export declare function registerAuth(app: Pick<ICloudbase, 'registerComponent'>): void;