@authing/guard-shim-react18 4.5.47-alpha.9 → 4.5.47-rc.2

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.
@@ -8,6 +8,7 @@
8
8
  * 再次打开页面时,初始化时先根据 FE 自定义的 LoginWay 跳转到不同的 tab 下(way)下使用 account 进行回填。TODO: 这里也可优化,应该在登录成功时候就进行 LoginWay 的格式化,而非转来转去。(但是这样无法直观的体现是哪种方式进行登录)
9
9
  */
10
10
  import { SelectOptions } from '../../../Login/multipleAccounts/panel';
11
+ export declare const LAST_USED_IDP = "__authing_last_used_idp__";
11
12
  export declare const QR_CODE_WAY: LoginWay[];
12
13
  /**
13
14
  * 登录时所有支持的登录列表(前端定义列表)
@@ -117,6 +118,7 @@ declare class MultipleAccount {
117
118
  private memberState;
118
119
  /**
119
120
  * 二维码登录时的ID
121
+ *「loginWay = "social"」社会化身份源登录时 其 id 表示为「唯一标识」
120
122
  */
121
123
  private qrCodeId?;
122
124
  /**
@@ -137,6 +139,10 @@ declare class MultipleAccount {
137
139
  * 是否开启国际化短信
138
140
  */
139
141
  private isInternationSms?;
142
+ /**
143
+ * 社会化登录列表 主要是为了做「置顶上次登录」
144
+ */
145
+ private socialLoginWays?;
140
146
  constructor();
141
147
  /**
142
148
  * 页面首次加载时初始化 Store
@@ -238,6 +244,7 @@ declare class MultipleAccount {
238
244
  * 外部暴露方法
239
245
  */
240
246
  getStore: () => {
247
+ getSocialLoginWays: () => User[] | undefined;
241
248
  initStore: (appId: string, options: {
242
249
  serverSideLoginMethods: LoginWay[];
243
250
  isInternationSms: boolean;
@@ -282,6 +289,7 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
282
289
  finallyConfig?: any;
283
290
  }) => {
284
291
  instance: {
292
+ getSocialLoginWays: () => User[] | undefined;
285
293
  initStore: (appId: string, options: {
286
294
  serverSideLoginMethods: LoginWay[];
287
295
  isInternationSms: boolean;
@@ -33,7 +33,8 @@ export declare enum GuardModuleType {
33
33
  INVITE_EXPIRE = "inviteExpire",// 邀请链接过期
34
34
  INVITE_PAGE_EXPIRE = "invitePageExpire",// 页面过期
35
35
  INVITE_SUCCESS = "inviteSuccess",// 邀请成功
36
- RESET_PASSWORD = "resetPassword"
36
+ RESET_PASSWORD = "resetPassword",
37
+ REGISTER_ACCOUNT_TYPE_SELECT = "accountTypeSelect"
37
38
  }
38
39
  export interface GuardModuleAction {
39
40
  action: string;
@@ -27,6 +27,7 @@ declare function useLoginAccountBackFill(options: {
27
27
  declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
28
28
  isMultipleAccount: boolean;
29
29
  multipleInstance: {
30
+ getSocialLoginWays: () => import("../../Guard/core/hooks/useMultipleAccounts").User[] | undefined;
30
31
  initStore: (appId: string, options: {
31
32
  serverSideLoginMethods: LoginWay[];
32
33
  isInternationSms: boolean;
@@ -61,7 +62,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
61
62
  getOriginAccount: () => string;
62
63
  getOriginWay: () => string;
63
64
  } | undefined;
64
- referMultipleState: ((type: "multiple" | "login") => void) | undefined;
65
+ referMultipleState: ((type: "login" | "multiple") => void) | undefined;
65
66
  backfillData: BackFillMultipleState | undefined;
66
67
  defaultQrWay: string | undefined;
67
68
  };
@@ -1 +1,5 @@
1
+ import { ApplicationConfig } from '../../../Type/application';
1
2
  export declare const IdpButton: (props: any) => JSX.Element | null;
3
+ export declare const MoreIdpButton: (props: {
4
+ idps: ApplicationConfig['identityProviders'];
5
+ }) => JSX.Element;
@@ -8,7 +8,6 @@ interface BindPasskeyProps {
8
8
  interface VerifyPasskeyProps {
9
9
  mfaToken: string;
10
10
  mfaLogin: (code: any, data: any, message?: string) => void;
11
- mfaConfigsMap: Map<MFAType, boolean>;
12
11
  }
13
12
  export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
14
13
  passkeyEnabled: boolean;
@@ -0,0 +1,3 @@
1
+ import { React } from 'shim-react';
2
+ import './style.less';
3
+ export declare const GuardRegisterAccountTypeView: React.FC;
@@ -8,4 +8,7 @@ export interface RegisterWithEmailCodeProps {
8
8
  publicConfig?: ApplicationConfig;
9
9
  registeContext?: any;
10
10
  }
11
+ /**
12
+ * @deprecated 废弃 🚒
13
+ */
11
14
  export declare const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
@@ -7,4 +7,7 @@ export interface RegisterWithPhoneProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  registeContext?: any;
9
9
  }
10
+ /**
11
+ * @deprecated 废弃 🚒
12
+ */
10
13
  export declare const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
@@ -285,9 +285,12 @@ export interface ApplicationConfig {
285
285
  protocol: Protocol;
286
286
  displayName: string;
287
287
  logo: string;
288
+ id: string;
288
289
  config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
289
290
  /** 是否开启内嵌模式 */
290
291
  embedded?: boolean;
292
+ tags?: string[];
293
+ tagsStatus?: boolean;
291
294
  }[];
292
295
  ssoPageComponentDisplay: {
293
296
  autoRegisterThenLoginHintInfo: boolean;
@@ -311,6 +314,11 @@ export interface ApplicationConfig {
311
314
  ad?: LoginTypeI18nProps;
312
315
  ldap?: LoginTypeI18nProps;
313
316
  };
317
+ idpLayout?: {
318
+ maxConns: number;
319
+ topLastUsed: boolean;
320
+ customMoreI18n: I18nLang;
321
+ };
314
322
  };
315
323
  protocol: Protocol;
316
324
  oidcConfig: OidcClientMetadata;
@@ -340,6 +348,8 @@ export interface ApplicationConfig {
340
348
  enabledMailPwdRegisterValid?: boolean;
341
349
  /** 是否开启邮箱域名匹配登录 */
342
350
  enabledMatchEmailDomain?: boolean;
351
+ /** 注册是否开启账号类型选择 */
352
+ enableAccountTypeSelect?: boolean;
343
353
  /**
344
354
  * 登录注册排序
345
355
  */
@@ -54,7 +54,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
54
54
  loginMethods?: LoginMethods[] | undefined;
55
55
  passwordLoginMethods?: string[] | undefined;
56
56
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
57
- socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
57
+ socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
58
58
  enterpriseConnections?: string[] | undefined;
59
59
  qrCodeScanOptions?: {
60
60
  extIdpConnId?: string | undefined;
@@ -111,6 +111,7 @@ export declare const useGuardAccountSelectInstance: () => {
111
111
  * 多账号 store 实例
112
112
  */
113
113
  instance?: {
114
+ getSocialLoginWays: () => import("../Guard/core/hooks/useMultipleAccounts").User[] | undefined;
114
115
  initStore: (appId: string, options: {
115
116
  serverSideLoginMethods: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[];
116
117
  isInternationSms: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react18",
3
- "version": "4.5.47-alpha.9",
3
+ "version": "4.5.47-rc.2",
4
4
  "description": "Guard shim for react 18, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",