@authing/react-ui-components 3.1.37-beta.3 → 3.1.37-beta.6

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/lib/index.d.ts CHANGED
@@ -1577,12 +1577,22 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1577
1577
 
1578
1578
  }
1579
1579
  declare module '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts' {
1580
+ /**
1581
+ * 整体的思路:
1582
+ * 在所有登录方式中,当进行登录时保存登录方式(FE侧自定义)
1583
+ * 之后在登录成功(onLogin)中,触发store的方法保存用户信息以及对应的登录方式进入localStorage。
1584
+ * 当用户再次打开页面时,拿出数据进行对比。(主要对比 LoginWay ),TODO: 这里的代码主要显得乱的原因是因为枚举的不正当使用。(主要要和Server端进行互相映射,后续维护时可优化)
1585
+ *
1586
+ * 核心思路:登录成功时,保存的FE侧自定义 LoginWay
1587
+ * 再次打开页面时,初始化时先根据 FE 自定义的 LoginWay 跳转到不同的 tab 下(way)下使用 account 进行回填。TODO: 这里也可优化,应该在登录成功时候就进行 LoginWay 的格式化,而非转来转去。(但是这样无法直观的体现是哪种方式进行登录)
1588
+ */
1580
1589
  import { SelectOptions } from '@authing/react-ui-components/components/Login/multipleAccounts/panel';
1581
1590
  export const QR_CODE_WAY: LoginWay[];
1582
1591
  /**
1583
1592
  * 登录时所有支持的登录列表(前端定义列表)
1593
+ * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
1584
1594
  */
1585
- export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap';
1595
+ export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
1586
1596
  /**
1587
1597
  * when: 多账号页面跳转进入登录页面
1588
1598
  * 携带的回填数据信息
@@ -1662,6 +1672,7 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1662
1672
  * 原始的登录账号
1663
1673
  */
1664
1674
  private originAccount;
1675
+ private originWay;
1665
1676
  /**
1666
1677
  * 原始的 localStore 值
1667
1678
  */
@@ -1770,6 +1781,13 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1770
1781
  * @returns
1771
1782
  */
1772
1783
  private setLoginWayByHttpData;
1784
+ /**
1785
+ * 根据登录的 account 判断本次LDAP登录方式
1786
+ * @param account 登录输入的账号
1787
+ * @param param1 登录成功返回的相关信息 用户名/手机号/邮箱
1788
+ * @returns
1789
+ */
1790
+ private setLoginWayByLDAPData;
1773
1791
  /**
1774
1792
  * 根据用户 ID 删除 localStorage 中当前用户 ID
1775
1793
  */
@@ -1815,6 +1833,11 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1815
1833
  phone?: string | undefined;
1816
1834
  email?: string | undefined;
1817
1835
  }) => void;
1836
+ setLoginWayByLDAPData: (account: string, data: {
1837
+ name?: string | undefined;
1838
+ phone?: string | undefined;
1839
+ email?: string | undefined;
1840
+ }) => void;
1818
1841
  getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
1819
1842
  getMemoSingleUser: (id: string) => {
1820
1843
  way: LoginWay;
@@ -1824,6 +1847,7 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1824
1847
  getMemberState: () => boolean;
1825
1848
  getFirstBackFillData: () => BackFillMultipleState | undefined;
1826
1849
  getOriginAccount: () => string;
1850
+ getOriginWay: () => string;
1827
1851
  };
1828
1852
  }
1829
1853
  /**
@@ -1851,6 +1875,11 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1851
1875
  phone?: string | undefined;
1852
1876
  email?: string | undefined;
1853
1877
  }) => void;
1878
+ setLoginWayByLDAPData: (account: string, data: {
1879
+ name?: string | undefined;
1880
+ phone?: string | undefined;
1881
+ email?: string | undefined;
1882
+ }) => void;
1854
1883
  getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
1855
1884
  getMemoSingleUser: (id: string) => {
1856
1885
  way: LoginWay;
@@ -1860,6 +1889,7 @@ declare module '@authing/react-ui-components/components/Guard/core/hooks/useMult
1860
1889
  getMemberState: () => boolean;
1861
1890
  getFirstBackFillData: () => BackFillMultipleState | undefined;
1862
1891
  getOriginAccount: () => string;
1892
+ getOriginWay: () => string;
1863
1893
  } | undefined;
1864
1894
  isMultipleAccount: boolean;
1865
1895
  referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState | undefined) => void;
@@ -1944,6 +1974,11 @@ declare module '@authing/react-ui-components/components/Guard/event' {
1944
1974
  phone?: string | undefined;
1945
1975
  email?: string | undefined;
1946
1976
  }) => void;
1977
+ setLoginWayByLDAPData: (account: string, data: {
1978
+ name?: string | undefined;
1979
+ phone?: string | undefined;
1980
+ email?: string | undefined;
1981
+ }) => void;
1947
1982
  getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
1948
1983
  getMemoSingleUser: (id: string) => {
1949
1984
  way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
@@ -1953,6 +1988,7 @@ declare module '@authing/react-ui-components/components/Guard/event' {
1953
1988
  getMemberState: () => boolean;
1954
1989
  getFirstBackFillData: () => import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
1955
1990
  getOriginAccount: () => string;
1991
+ getOriginWay: () => string;
1956
1992
  } | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
1957
1993
  export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
1958
1994
  export const GuardEventsCamelToKebabMapping: {
@@ -2495,6 +2531,11 @@ declare module '@authing/react-ui-components/components/Login/hooks/useLoginMult
2495
2531
  phone?: string | undefined;
2496
2532
  email?: string | undefined;
2497
2533
  }) => void;
2534
+ setLoginWayByLDAPData: (account: string, data: {
2535
+ name?: string | undefined;
2536
+ phone?: string | undefined;
2537
+ email?: string | undefined;
2538
+ }) => void;
2498
2539
  getMemoUser: (excludeWays?: LoginWay[]) => import("@authing/react-ui-components/components/Login/multipleAccounts/panel").SelectOptions[];
2499
2540
  getMemoSingleUser: (id: string) => {
2500
2541
  way: LoginWay;
@@ -2504,6 +2545,7 @@ declare module '@authing/react-ui-components/components/Login/hooks/useLoginMult
2504
2545
  getMemberState: () => boolean;
2505
2546
  getFirstBackFillData: () => BackFillMultipleState | undefined;
2506
2547
  getOriginAccount: () => string;
2548
+ getOriginWay: () => string;
2507
2549
  } | undefined;
2508
2550
  referMultipleState: ((type: "login" | "multiple") => void) | undefined;
2509
2551
  backfillData: BackFillMultipleState | undefined;
@@ -3631,6 +3673,11 @@ declare module '@authing/react-ui-components/components/_utils/context' {
3631
3673
  phone?: string | undefined;
3632
3674
  email?: string | undefined;
3633
3675
  }) => void;
3676
+ setLoginWayByLDAPData: (account: string, data: {
3677
+ name?: string | undefined;
3678
+ phone?: string | undefined;
3679
+ email?: string | undefined;
3680
+ }) => void;
3634
3681
  getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
3635
3682
  getMemoSingleUser: (id: string) => {
3636
3683
  way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
@@ -3640,6 +3687,7 @@ declare module '@authing/react-ui-components/components/_utils/context' {
3640
3687
  getMemberState: () => boolean;
3641
3688
  getFirstBackFillData: () => BackFillMultipleState | undefined;
3642
3689
  getOriginAccount: () => string;
3690
+ getOriginWay: () => string;
3643
3691
  } | undefined;
3644
3692
  /**
3645
3693
  * 切换多账号 isMultipleAccount 状态
@@ -4118,7 +4166,7 @@ declare module '@authing/react-ui-components/components/version/index' {
4118
4166
 
4119
4167
  }
4120
4168
  declare module '@authing/react-ui-components/components/version/version' {
4121
- const _default: "3.1.37-beta.3";
4169
+ const _default: "3.1.37-beta.6";
4122
4170
  export default _default;
4123
4171
 
4124
4172
  }