@authing/react-ui-components 2.4.55-alpha.6 → 2.4.55-alpha.7

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": "@authing/react-ui-components",
3
- "version": "2.4.55-alpha.6",
3
+ "version": "2.4.55-alpha.7",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "lib/index.d.ts",
@@ -121,14 +121,20 @@ const useNormalLoginTabs = ({ onSuccess, onFail }: BaseFormProps) => {
121
121
 
122
122
  let tabs: any[] = []
123
123
 
124
- loginMethods.forEach((method: LoginMethods) => {
124
+ // 兼容 密码登陆 donglyc
125
+ let filterLoginMethods = loginMethods.filter(
126
+ (d) => d.indexOf('password') === -1
127
+ )
128
+ const hasPassword = loginMethods.some((d) => d.indexOf('password') !== -1)
129
+ if (hasPassword) filterLoginMethods.push(LoginMethods.Password)
130
+
131
+ filterLoginMethods.forEach((method: LoginMethods) => {
125
132
  if (
126
133
  [LoginMethods.WechatMpQrcode, LoginMethods.WxMinQr].includes(method) &&
127
134
  qrcodeTabsSettings[method]
128
135
  ) {
129
136
  tabs.push(
130
137
  ...qrcodeTabsSettings[method].map((idp) => {
131
- console.log(idp)
132
138
  return {
133
139
  key: idp.id,
134
140
  label: idp.title || loginMethodTitleMapping[method],
@@ -177,7 +183,6 @@ export const LoginLayout = () => {
177
183
  }
178
184
  return activeTab
179
185
  }, [activeTabs, qrcodeTabsSettings])
180
- console.log(activeKey)
181
186
 
182
187
  return (
183
188
  <>
package/src/index.tsx CHANGED
@@ -4,6 +4,8 @@ import ReactDOM from 'react-dom'
4
4
  import { Lang } from './components'
5
5
  import { AuthingGuard } from './components/AuthingGuard'
6
6
 
7
+ import { SocialConnectionProvider } from 'authing-js-sdk'
8
+
7
9
  import {
8
10
  GuardMode,
9
11
  // LoginMethods,
@@ -21,8 +23,9 @@ const App = () => {
21
23
 
22
24
  const config: UserConfig = {
23
25
  mode: GuardMode.Modal,
24
- appHost: 'https://core.dev2.authing-inc.co',
25
- // apiHost: 'http://console.authing.localhost:3000',
26
+ // appHost: 'https://core.dev2.authing-inc.co',
27
+ apiHost: 'http://console.authing.localhost:3000',
28
+ // appHost: 'http://0w9ugz.authing.localhost:3000',
26
29
  // apiHost: 'http://192.168.50.57:3000',
27
30
  // loginMethods: Object.values(LoginMethods),
28
31
  // logo:
@@ -53,7 +56,7 @@ const App = () => {
53
56
  // }
54
57
  // `,
55
58
  // // autoRegister: true,
56
- // socialConnections: [SocialConnections.AppleWeb],
59
+ socialConnections: [SocialConnectionProvider.WECHATPC],
57
60
  }
58
61
 
59
62
  const [visible, setVisible] = useState(false)
@@ -70,6 +73,14 @@ const App = () => {
70
73
  return (
71
74
  // eslint-disable-next-line react/jsx-no-undef
72
75
  <>
76
+ <Button
77
+ type="primary"
78
+ onClick={() => {
79
+ //
80
+ }}
81
+ >
82
+ add socialConnections
83
+ </Button>
73
84
  <Button
74
85
  type="primary"
75
86
  onClick={() => {
@@ -114,8 +125,8 @@ const App = () => {
114
125
  }}
115
126
  // onLoad={(a) => console.log(a, '加载完成')}
116
127
  // onPwdResetError={(e) => console.log(e)}
117
- appId="619c7976cd38c13a2222464f"
118
- tenantId="61a5ed126cddae656cce9007"
128
+ appId="61ada57aef5ed526528ed5b6"
129
+ // tenantId="61a5ed126cddae656cce9007"
119
130
  // appId="5fd877fb0ba0421962eced94"
120
131
  config={config}
121
132
  />