@authing/react-ui-components 2.4.54-alpha.0 → 2.4.55-alpha.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.
Files changed (66) hide show
  1. package/build/asset-manifest.json +18 -18
  2. package/build/index.html +1 -1
  3. package/build/static/css/{2.40c24d2f.chunk.css → 2.e5f4a1ca.chunk.css} +2 -2
  4. package/build/static/css/2.e5f4a1ca.chunk.css.map +1 -0
  5. package/build/static/css/main.4dd73333.chunk.css +2 -0
  6. package/build/static/css/main.4dd73333.chunk.css.map +1 -0
  7. package/build/static/js/2.b28e1968.chunk.js +3 -0
  8. package/build/static/js/2.b28e1968.chunk.js.LICENSE.txt +70 -0
  9. package/build/static/js/2.b28e1968.chunk.js.map +1 -0
  10. package/build/static/js/{3.edcab7cd.chunk.js → 3.584da164.chunk.js} +2 -2
  11. package/build/static/js/{3.edcab7cd.chunk.js.map → 3.584da164.chunk.js.map} +1 -1
  12. package/build/static/js/main.eeb41586.chunk.js +2 -0
  13. package/build/static/js/main.eeb41586.chunk.js.map +1 -0
  14. package/build/static/js/{runtime-main.1b4b9135.js → runtime-main.6174f3e9.js} +2 -2
  15. package/build/static/js/{runtime-main.1b4b9135.js.map → runtime-main.6174f3e9.js.map} +1 -1
  16. package/lib/index.min.css +1 -2
  17. package/lib/index.min.js +1 -1
  18. package/lib/index.min.js.LICENSE.txt +0 -64
  19. package/package.json +3 -5
  20. package/src/common/AuthingDropdown/index.tsx +20 -58
  21. package/src/common/AuthingDropdown/style.less +8 -33
  22. package/src/components/AuthingGuard/AppMFALayout/index.tsx +15 -30
  23. package/src/components/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +3 -1
  24. package/src/components/AuthingGuard/GuardLayout/index.tsx +16 -32
  25. package/src/components/AuthingGuard/GuardLayout/style.less +0 -4
  26. package/src/components/AuthingGuard/Header/index.tsx +5 -2
  27. package/src/components/AuthingGuard/Header/style.less +23 -11
  28. package/src/components/AuthingGuard/IconFont/iconfont.js +74 -1
  29. package/src/components/AuthingGuard/LoginLayout/index.tsx +53 -22
  30. package/src/components/AuthingGuard/api/appConfig.ts +3 -2
  31. package/src/components/AuthingGuard/api/http.ts +32 -9
  32. package/src/components/AuthingGuard/constants.ts +2 -0
  33. package/src/components/AuthingGuard/hooks/index.tsx +0 -37
  34. package/src/components/AuthingGuard/index.tsx +8 -3
  35. package/src/components/AuthingGuard/locales/en/common.json +1 -2
  36. package/src/components/AuthingGuard/locales/en/login.json +1 -1
  37. package/src/components/AuthingGuard/locales/zh/common.json +1 -16
  38. package/src/components/AuthingGuard/types/Forms.ts +1 -2
  39. package/src/components/AuthingGuard/types/GuardConfig.ts +2 -1
  40. package/src/context/global/reducer.tsx +0 -4
  41. package/src/index.tsx +16 -28
  42. package/src/utils/index.ts +0 -23
  43. package/yarn-error.log +19616 -0
  44. package/build/static/css/2.40c24d2f.chunk.css.map +0 -1
  45. package/build/static/css/main.ee0e3901.chunk.css +0 -2
  46. package/build/static/css/main.ee0e3901.chunk.css.map +0 -1
  47. package/build/static/js/2.354276b9.chunk.js +0 -3
  48. package/build/static/js/2.354276b9.chunk.js.LICENSE.txt +0 -156
  49. package/build/static/js/2.354276b9.chunk.js.map +0 -1
  50. package/build/static/js/main.6c028b56.chunk.js +0 -2
  51. package/build/static/js/main.6c028b56.chunk.js.map +0 -1
  52. package/lib/index.d.ts +0 -1374
  53. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/AppDownload.tsx +0 -198
  54. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/BindSuccess.tsx +0 -48
  55. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/CopyIcon.tsx +0 -52
  56. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/InputSaftyCode.tsx +0 -25
  57. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/SaveSecretKey.tsx +0 -34
  58. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/ScanQrcode.tsx +0 -44
  59. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/index.tsx +0 -40
  60. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/BindTotpForm/styles.less +0 -454
  61. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/index.tsx +0 -49
  62. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/MobileSteps/style.less +0 -10
  63. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/index.tsx +0 -361
  64. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/UserMfa/style.less +0 -12
  65. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/VerifyTotpForm.tsx +0 -120
  66. package/src/components/AuthingGuard/Forms/TotpMfaVerifyForm/index.tsx +0 -35
@@ -4,70 +4,6 @@
4
4
  http://jedwatson.github.io/classnames
5
5
  */
6
6
 
7
- /*!**********************!*\
8
- !*** ./lib/index.js ***!
9
- \**********************/
10
-
11
- /*!**************************!*\
12
- !*** ./lib/JSEncrypt.js ***!
13
- \**************************/
14
-
15
- /*!**************************!*\
16
- !*** ./lib/version.json ***!
17
- \**************************/
18
-
19
- /*!*****************************!*\
20
- !*** ./lib/lib/jsbn/rng.js ***!
21
- \*****************************/
22
-
23
- /*!*****************************!*\
24
- !*** ./lib/lib/jsbn/rsa.js ***!
25
- \*****************************/
26
-
27
- /*!******************************!*\
28
- !*** ./lib/lib/jsbn/jsbn.js ***!
29
- \******************************/
30
-
31
- /*!******************************!*\
32
- !*** ./lib/lib/jsbn/util.js ***!
33
- \******************************/
34
-
35
- /*!*******************************!*\
36
- !*** ./lib/lib/asn1js/hex.js ***!
37
- \*******************************/
38
-
39
- /*!*******************************!*\
40
- !*** ./lib/lib/jsbn/prng4.js ***!
41
- \*******************************/
42
-
43
- /*!********************************!*\
44
- !*** ./lib/JSEncryptRSAKey.js ***!
45
- \********************************/
46
-
47
- /*!********************************!*\
48
- !*** ./lib/lib/asn1js/asn1.js ***!
49
- \********************************/
50
-
51
- /*!********************************!*\
52
- !*** ./lib/lib/jsbn/base64.js ***!
53
- \********************************/
54
-
55
- /*!*********************************!*\
56
- !*** ./lib/lib/asn1js/int10.js ***!
57
- \*********************************/
58
-
59
- /*!**********************************!*\
60
- !*** ./lib/lib/asn1js/base64.js ***!
61
- \**********************************/
62
-
63
- /*!************************************!*\
64
- !*** ./lib/lib/jsrsasign/yahoo.js ***!
65
- \************************************/
66
-
67
- /*!***************************************!*\
68
- !*** ./lib/lib/jsrsasign/asn1-1.0.js ***!
69
- \***************************************/
70
-
71
7
  /** @license React v16.13.1
72
8
  * react-is.production.min.js
73
9
  *
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "2.4.54-alpha.0",
3
+ "version": "2.4.55-alpha.2",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "dependencies": {
8
8
  "antd": "^4.8.0",
9
- "authing-js-sdk": "4.20.23",
10
- "globalthis": "^1.0.2",
9
+ "authing-js-sdk": "4.22.26-alpha.9",
11
10
  "qs": "^6.9.4"
12
11
  },
13
12
  "peerDependencies": {
@@ -185,6 +184,5 @@
185
184
  "webpack-dev-server": "3.11.0",
186
185
  "webpack-manifest-plugin": "2.2.0",
187
186
  "workbox-webpack-plugin": "5.1.4"
188
- },
189
- "gitHead": "cac8e746b1b2b0e49fa8fba7e85fbbf88099003d"
187
+ }
190
188
  }
@@ -1,6 +1,5 @@
1
1
  import { DownOutlined } from '@ant-design/icons'
2
- import React, { FC, useEffect, useRef, useState } from 'react'
3
- import { createPortal } from 'react-dom'
2
+ import React, { FC, useState } from 'react'
4
3
  import { getClassnames } from '../../utils'
5
4
 
6
5
  import './style.less'
@@ -21,69 +20,32 @@ export const AuthingDropdown: FC<{
21
20
  }> = ({ menus, children, className }) => {
22
21
  const [visible, setVisible] = useState(false)
23
22
 
24
- const triggerRef = useRef<HTMLDivElement>(null)
25
-
26
- const [top, setTop] = useState<number>()
27
- const [left, setLeft] = useState<number>()
28
-
29
- useEffect(() => {
30
- const global = require('globalthis')()
31
-
32
- const changePosition = () => {
33
- const value = triggerRef.current?.getBoundingClientRect()
34
- value && setTop(value?.top + value?.height)
35
- value && setLeft(value?.left)
36
- }
37
-
38
- changePosition()
39
- global?.window.addEventListener('scroll', changePosition)
40
- global?.window.addEventListener('DOMNodeInserted', changePosition)
41
- global?.window.addEventListener('DOMNodeRemoved', changePosition)
42
- global.window.onresize = changePosition
43
- return () => {
44
- global?.window.removeEventListener('scroll', changePosition)
45
- global?.window.removeEventListener('DOMNodeInserted', changePosition)
46
- global?.window.removeEventListener('DOMNodeRemoved', changePosition)
47
- }
48
- }, [])
49
-
50
23
  return (
51
- // TODO
52
- // 没有下拉 与回收的动效,暂时没有时间搞,之后优化
53
24
  <div
54
25
  className={getClassnames(['authing-dropdown', className])}
55
26
  onMouseEnter={() => setVisible(true)}
56
27
  onMouseLeave={() => setVisible(false)}
57
28
  >
58
- <div ref={triggerRef} className="authing-dropdown-trigger">
59
- {children}
29
+ <div className="authing-dropdown-trigger">{children}</div>
30
+ <div
31
+ className={getClassnames([
32
+ 'authing-dropdown-menu-container',
33
+ visible && 'authing-dropdown-menu-container__visible',
34
+ ])}
35
+ >
36
+ {menus.map((item) => (
37
+ <div
38
+ className="authing-dropdown-menu-item"
39
+ onClick={(evt) => {
40
+ setVisible(false)
41
+ item.onClick?.(item.key, evt)
42
+ }}
43
+ key={item.key}
44
+ >
45
+ {item.label}
46
+ </div>
47
+ ))}
60
48
  </div>
61
- {visible
62
- ? createPortal(
63
- <div
64
- data-id="authing-dropdown-menu"
65
- className={getClassnames(['authing-dropdown-menu-container'])}
66
- style={{
67
- top: top,
68
- left: left,
69
- }}
70
- >
71
- {menus.map((item) => (
72
- <div
73
- className="authing-dropdown-menu-item"
74
- onClick={(evt) => {
75
- setVisible(false)
76
- item.onClick?.(item.key, evt)
77
- }}
78
- key={item.key}
79
- >
80
- {item.label}
81
- </div>
82
- ))}
83
- </div>,
84
- document.body
85
- )
86
- : null}
87
49
  <DownOutlined className="authing-dropdown-icon" />
88
50
  </div>
89
51
  )
@@ -9,50 +9,25 @@
9
9
  }
10
10
 
11
11
  .authing-dropdown-menu-container {
12
- height: auto;
13
- opacity: 1;
14
- pointer-events: unset;
12
+ height: 0;
13
+ opacity: 0;
15
14
  position: absolute;
16
15
  top: 100%;
17
16
  left: 0;
18
- // transition: all 0.3s;
17
+ transition: all 0.3s;
19
18
  cursor: pointer;
20
19
  background-color: #fff;
21
20
  padding: 4px 0;
22
21
  border-radius: 2px;
23
22
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
24
23
  0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
25
- }
26
- @keyframes slide-down {
27
- 0% {
28
- transform: scale(1, 0);
29
- }
30
- 100% {
31
- transform: scale(1, 1);
32
- }
33
- }
34
-
35
- @-webkit-keyframes slide-down {
36
- 0% {
37
- -webkit-transform: scale(1, 0);
38
- }
39
- 100% {
40
- -webkit-transform: scale(1, 1);
41
- }
42
- }
43
-
44
- .authing-dropdown-menu-container_show {
45
- max-height: auto;
46
- transition: max-height 0.3s ease-in;
47
- transform-origin: 50% 0;
48
- animation: slide-down 0.3s ease-in;
49
- -webkit-animation: slide-down 0.3s ease-in;
24
+ pointer-events: none;
50
25
  }
51
26
 
52
- .authing-dropdown-menu-container_hidden {
53
- max-height: 0px;
54
- overflow: auto;
55
- transition: max-height 0.3s ease-out;
27
+ .authing-dropdown-menu-container__visible {
28
+ height: auto;
29
+ opacity: 1;
30
+ pointer-events: unset;
56
31
  }
57
32
 
58
33
  .authing-dropdown-menu-item {
@@ -1,6 +1,6 @@
1
1
  import { message } from 'antd'
2
2
  import { User } from 'authing-js-sdk'
3
- import React, { FC, ReactNode, useState, useEffect, useMemo } from 'react'
3
+ import React, { FC, useState } from 'react'
4
4
  import { useTranslation } from 'react-i18next'
5
5
  import { AuthingDropdown } from 'src/common/AuthingDropdown'
6
6
 
@@ -10,7 +10,6 @@ import {
10
10
  } from '../../../components/AuthingGuard/Forms'
11
11
  import { useGuardContext } from '../../../context/global/context'
12
12
  import { ApplicationMfaType, ApplicationMfaTypeLabel } from '../api'
13
- import { TotpMfaVerifyForm } from '../Forms/TotpMfaVerifyForm'
14
13
 
15
14
  import './style.less'
16
15
 
@@ -38,38 +37,24 @@ export const AppMfaLayout: FC<MfaLayoutProps> = () => {
38
37
  onFail,
39
38
  }
40
39
 
41
- const formMap: Record<ApplicationMfaType, ReactNode> = {
40
+ const formMap = {
42
41
  [ApplicationMfaType.EMAIL]: <EmailMfaVerifyForm {...formProps} />,
43
42
  [ApplicationMfaType.SMS]: <SmsMfaVerifyForm {...formProps} />,
44
- [ApplicationMfaType.OTP]: <TotpMfaVerifyForm {...formProps} />,
45
43
  }
46
44
 
47
- // 其他可选的模块
48
- const availableMfaType = useMemo(() => {
49
- return mfaData.applicationMfa
50
- ?.filter(
51
- (item) =>
52
- item.status &&
53
- Object.keys(ApplicationMfaType).includes(item.mfaPolicy) &&
54
- type !== item.mfaPolicy
55
- )
56
- ?.sort((a, b) => a.sort - b.sort)
57
- ?.map((item) => ({
58
- label: ApplicationMfaTypeLabel()[item.mfaPolicy],
59
- key: item.mfaPolicy,
60
- onClick() {
61
- setType(item.mfaPolicy)
62
- },
63
- }))
64
- }, [mfaData, type])
65
-
66
- // 根据配置动态确定 mfa 模块
67
- useEffect(() => {
68
- // 取出第一个模块 作为默认值
69
- if (mfaData.applicationMfa && mfaData.applicationMfa.length > 0) {
70
- setType(mfaData.applicationMfa[0].mfaPolicy)
71
- }
72
- }, [mfaData])
45
+ const availableMfaType = mfaData.applicationMfa
46
+ ?.filter(
47
+ (item) =>
48
+ item.status && Object.keys(ApplicationMfaType).includes(item.mfaPolicy)
49
+ )
50
+ ?.sort((a, b) => a.sort - b.sort)
51
+ ?.map((item) => ({
52
+ label: ApplicationMfaTypeLabel()[item.mfaPolicy],
53
+ key: item.mfaPolicy,
54
+ onClick() {
55
+ setType(item.mfaPolicy)
56
+ },
57
+ }))
73
58
 
74
59
  return (
75
60
  <div className="authing-text-center">
@@ -14,6 +14,7 @@ export const QrCodeLoginForm: FC<QrLoginFormProps> = ({
14
14
  onFail,
15
15
  onSuccess,
16
16
  type,
17
+ idpId,
17
18
  }) => {
18
19
  const {
19
20
  state: { authClient, config },
@@ -31,6 +32,7 @@ export const QrCodeLoginForm: FC<QrLoginFormProps> = ({
31
32
 
32
33
  useEffect(() => {
33
34
  client.startScanning('authingGuardQrcode', {
35
+ extIdpConnId: idpId,
34
36
  autoExchangeUserInfo: true,
35
37
  ...config.qrCodeScanOptions,
36
38
  onStart(timer) {
@@ -46,7 +48,7 @@ export const QrCodeLoginForm: FC<QrLoginFormProps> = ({
46
48
  },
47
49
  })
48
50
  return () => clearInterval(timerRef.current)
49
- }, [client, config.qrCodeScanOptions, onFail, onSuccess])
51
+ }, [client, config.qrCodeScanOptions, idpId, onFail, onSuccess])
50
52
 
51
53
  return (
52
54
  <div className="authing-guard-qr-form">
@@ -165,9 +165,12 @@ const useGuardConfig = () => {
165
165
  // 默认登录方式
166
166
  const defaultLoginMethod =
167
167
  userConfig.defaultLoginMethod ||
168
+ appConfig.loginTabs?.defaultV2 ||
168
169
  appConfig.loginTabs?.default ||
169
170
  defaultGuardConfig.defaultLoginMethod
170
171
 
172
+ const loginMethodTitleMapping = appConfig.loginTabs?.title
173
+
171
174
  // 注册方式
172
175
  const registerMethods =
173
176
  userConfig.registerMethods ||
@@ -184,6 +187,8 @@ const useGuardConfig = () => {
184
187
  ? ''
185
188
  : userConfig.title ?? appConfig.name ?? defaultGuardConfig.title
186
189
 
190
+ const description = loading ? '' : appConfig.description ?? ''
191
+
187
192
  // 应用 logo
188
193
  const logo = loading
189
194
  ? ''
@@ -218,6 +223,7 @@ const useGuardConfig = () => {
218
223
  {
219
224
  logo,
220
225
  title,
226
+ description,
221
227
  autoRegister,
222
228
  loginMethods,
223
229
  passwordLoginMethods,
@@ -232,17 +238,19 @@ const useGuardConfig = () => {
232
238
  publicKey: appConfig.publicKey,
233
239
  agreementEnabled: appConfig.agreementEnabled,
234
240
  agreements: appConfig.agreements,
235
- cdnBase: appConfig.cdnBase,
241
+ loginMethodTitleMapping: loginMethodTitleMapping,
236
242
  }
237
243
  )
238
244
  }, [
239
245
  userConfig,
240
246
  appConfig.loginTabs?.list,
241
247
  appConfig.loginTabs?.default,
248
+ appConfig.loginTabs?.title,
242
249
  appConfig.passwordTabConfig?.enabledLoginMethods,
243
250
  appConfig.registerTabs?.list,
244
251
  appConfig.registerTabs?.default,
245
252
  appConfig.name,
253
+ appConfig.description,
246
254
  appConfig.logo,
247
255
  appConfig.ssoPageComponentDisplay?.autoRegisterThenLoginHintInfo,
248
256
  appConfig.ssoPageComponentDisplay?.registerBtn,
@@ -250,7 +258,6 @@ const useGuardConfig = () => {
250
258
  appConfig.publicKey,
251
259
  appConfig.agreementEnabled,
252
260
  appConfig.agreements,
253
- appConfig.cdnBase,
254
261
  appConfig.socialConnections,
255
262
  appConfig.identityProviders,
256
263
  loading,
@@ -312,16 +319,7 @@ export const GuardLayout: FC<{
312
319
  }) => {
313
320
  const { t } = useTranslation()
314
321
  const {
315
- state: {
316
- guardScenes,
317
- authClient,
318
- guardEvents,
319
- activeTabs,
320
- localesConfig,
321
- guardSize,
322
- showHeader,
323
- showBottom,
324
- },
322
+ state: { guardScenes, authClient, guardEvents, activeTabs, localesConfig },
325
323
  setValue,
326
324
  } = useGuardContext()
327
325
 
@@ -329,17 +327,6 @@ export const GuardLayout: FC<{
329
327
 
330
328
  const { loading, errorMsg, guardConfig, errorDetail } = useGuardConfig()
331
329
 
332
- const guardSizeClassName = useMemo(() => {
333
- switch (guardSize) {
334
- case 'large':
335
- return 'authing-guard-size_large'
336
-
337
- case 'middle':
338
- case 'small':
339
- return 'authing-guard-size'
340
- }
341
- }, [guardSize])
342
-
343
330
  useEffect(() => {
344
331
  if (lang) {
345
332
  authClient.setLang(lang)
@@ -430,8 +417,8 @@ export const GuardLayout: FC<{
430
417
  [GuardScenes.Login]: <LoginLayout />,
431
418
  [GuardScenes.Register]: <RegisterLayout />,
432
419
  [GuardScenes.RestPassword]: <ResetPwdLayout />,
433
- [GuardScenes.CompleteUserInfo]: <CompleteUserInfoLayout />,
434
420
  [GuardScenes.MfaVerify]: <MfaLayout />,
421
+ [GuardScenes.CompleteUserInfo]: <CompleteUserInfoLayout />,
435
422
  [GuardScenes.AppMfaVerify]: <AppMfaLayout />,
436
423
  }
437
424
 
@@ -468,7 +455,6 @@ export const GuardLayout: FC<{
468
455
  className={getClassnames([
469
456
  'authing-guard-container',
470
457
  !realVisible && 'authing-guard-container__hidden',
471
- guardSizeClassName,
472
458
  ])}
473
459
  >
474
460
  {isModal && guardConfig.clickCloseable && (
@@ -477,7 +463,7 @@ export const GuardLayout: FC<{
477
463
  </button>
478
464
  )}
479
465
 
480
- {showHeader && <GuardHeader />}
466
+ <GuardHeader />
481
467
 
482
468
  {loading ? (
483
469
  <Spin size="large" className="authing-guard-loading" />
@@ -486,12 +472,10 @@ export const GuardLayout: FC<{
486
472
  ) : (
487
473
  layoutMap[guardScenes]
488
474
  )}
489
-
490
- {showBottom && (
491
- <div className={'authing-guard-bottom'}>
492
- {localesConfig?.isShowChange === false ? null : <ToggleLang />}
493
- </div>
494
- )}
475
+ {/* <div>{localesConfig?.isShowChange && <ToggleLang />}</div> */}
476
+ <div>
477
+ {localesConfig?.isShowChange === false ? null : <ToggleLang />}
478
+ </div>
495
479
  </div>
496
480
  </>
497
481
  </div>
@@ -56,10 +56,6 @@
56
56
  transition: all 0.3s;
57
57
  }
58
58
 
59
- .authing-guard-size_large {
60
- width: 900px;
61
- }
62
-
63
59
  .authing-guard-container__hidden {
64
60
  transform: translateY(2000px);
65
61
  }
@@ -10,7 +10,7 @@ export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
10
10
  export const GuardHeader: FC<HeaderProps> = (props) => {
11
11
  const {
12
12
  state: {
13
- config: { logo, title },
13
+ config: { logo, title, description },
14
14
  },
15
15
  } = useGuardContext()
16
16
 
@@ -19,7 +19,10 @@ export const GuardHeader: FC<HeaderProps> = (props) => {
19
19
  {Boolean(logo) && (
20
20
  <Avatar className="authing-guard-logo" src={logo} size={50}></Avatar>
21
21
  )}
22
- <div className="authing-guard-title">{title}</div>
22
+ <div className="authing-guard-title-container">
23
+ <div className="authing-guard-title">{title}</div>
24
+ <div className="authing-guard-description">{description}</div>
25
+ </div>
23
26
  </div>
24
27
  )
25
28
  }
@@ -13,23 +13,26 @@
13
13
  object-fit: contain;
14
14
  }
15
15
 
16
+ .authing-guard-title-container {
17
+ display: flex;
18
+ justify-content: center;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ }
22
+
16
23
  .authing-guard-title {
17
- color: #abb9d7;
24
+ color: #282d3c;
18
25
  font-size: 24px;
19
- margin-bottom: 24px;
26
+ margin-bottom: 4px;
20
27
  width: 100%;
21
28
  word-break: break-all;
22
29
  text-align: center;
23
30
  }
24
-
25
- // .large .logo {
26
- // margin-bottom: 16px;
27
- // }
28
-
29
- // .large .title {
30
- // color: #333333;
31
- // font-size: 32px;
32
- // }
31
+ .authing-guard-description {
32
+ font-size: 16px;
33
+ color: #878a95;
34
+ margin-bottom: 23px;
35
+ }
33
36
 
34
37
  @media only screen and (max-width: 719px) {
35
38
  .authing-guard-header {
@@ -45,8 +48,17 @@
45
48
  padding-left: 8px;
46
49
  color: #333333;
47
50
  font-weight: 500;
51
+ text-align: unset;
48
52
  }
49
53
  .authing-guard-logo {
50
54
  margin: 0;
51
55
  }
56
+ .authing-guard-title-container {
57
+ flex-direction: column;
58
+ align-items: flex-start;
59
+ }
60
+ .authing-guard-description {
61
+ margin-bottom: 0px;
62
+ padding-left: 8px;
63
+ }
52
64
  }