@authing/guard-shim-react 4.5.33 → 4.5.34

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.
@@ -277,7 +277,7 @@ declare class MultipleAccount {
277
277
  * MultipleAccounts 相关 Hook
278
278
  * Finally Config 类型过滤
279
279
  */
280
- declare const useMultipleAccounts: ({ appId, finallyConfig }: {
280
+ declare const useSelectAccounts: ({ appId, finallyConfig }: {
281
281
  appId?: string | undefined;
282
282
  finallyConfig?: any;
283
283
  }) => {
@@ -321,4 +321,4 @@ declare const useMultipleAccounts: ({ appId, finallyConfig }: {
321
321
  multipleAccountData: BackFillMultipleState | undefined;
322
322
  clearBackFillData: () => void;
323
323
  };
324
- export default useMultipleAccounts;
324
+ export default useSelectAccounts;
@@ -13,9 +13,10 @@ interface LoginWithLDAPProps {
13
13
  */
14
14
  multipleInstance?: StoreInstance;
15
15
  /**
16
- * 多账号回填的数据
16
+ * 选择已登录账号回填的数据
17
17
  */
18
18
  backfillData?: BackFillMultipleState;
19
+ loginHint?: string;
19
20
  }
20
21
  export declare const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
21
22
  export {};
@@ -19,9 +19,10 @@ interface LoginWithPasswordProps {
19
19
  */
20
20
  multipleInstance?: StoreInstance;
21
21
  /**
22
- * 多账号回填的数据
22
+ * 选择已登录账号回填的数据
23
23
  */
24
24
  backfillData?: BackFillMultipleState;
25
+ loginHint?: string;
25
26
  }
26
27
  export declare const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
27
28
  export {};
@@ -2,26 +2,29 @@ import { FormInstance } from 'shim-antd/lib/form';
2
2
  import { React } from 'shim-react';
3
3
  import { BackFillMultipleState, LoginWay } from '../../Guard/core/hooks/useMultipleAccounts';
4
4
  /**
5
- * 多账号登录下 账户 & 登录方式自动回填
5
+ * 登录账号选择时:账户 & 登录方式自动回填
6
+ * oidc 时:login_hint 回填账号
7
+ *
6
8
  * TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
7
9
  * 调用地方 core 中需要回填的两个登录方式
8
10
  */
9
- declare function useLoginMultipleBackFill(options: {
11
+ declare function useLoginAccountBackFill(options: {
10
12
  form: FormInstance<any>;
11
- way: LoginWay;
13
+ way: LoginWay | LoginWay[];
12
14
  formKey: string;
13
15
  backfillData?: BackFillMultipleState;
14
16
  isOnlyInternationSms?: boolean;
15
17
  setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
16
18
  cancelBackfill?: boolean;
17
19
  changeCurrentMethod?: (account: string) => void;
20
+ loginHint?: string;
18
21
  }): void;
19
22
  /**
20
23
  * 多账号统一状态管理
21
24
  * @param setLoginWay
22
25
  * @returns
23
26
  */
24
- declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
27
+ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
25
28
  isMultipleAccount: boolean;
26
29
  multipleInstance: {
27
30
  initStore: (appId: string, options: {
@@ -62,4 +65,4 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
62
65
  backfillData: BackFillMultipleState | undefined;
63
66
  defaultQrWay: string | undefined;
64
67
  };
65
- export { useLoginMultipleBackFill, useLoginMultiple };
68
+ export { useLoginAccountBackFill, useLoginSelectAccount as useLoginMultiple };
@@ -20,6 +20,7 @@ export interface LoginConfig extends IG2Config {
20
20
  * 关闭二维码状态check轮询(console上使用)
21
21
  */
22
22
  _closeLoopCheckQrcode?: boolean;
23
+ loginHint?: string;
23
24
  }
24
25
  export interface LoginEvents extends IG2Events {
25
26
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
@@ -101,6 +101,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
101
101
  withCustomData?: boolean | undefined;
102
102
  } | undefined;
103
103
  _closeLoopCheckQrcode?: boolean | undefined;
104
+ loginHint?: string | undefined;
104
105
  goBack?: (() => void) | null | undefined;
105
106
  };
106
107
  guardPageConfig: GuardPageConfig;
@@ -97,7 +97,7 @@ export declare const useGuardPageConfig: () => Partial<GuardPageConfig>;
97
97
  /**
98
98
  * 多账号登录 store 实例
99
99
  */
100
- export declare const useGuardMultipleInstance: () => {
100
+ export declare const useGuardAccountSelectInstance: () => {
101
101
  /**
102
102
  * 多账号相关
103
103
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.33",
3
+ "version": "4.5.34",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",