From e1cb0ec21e7ae46ce7bd0d97dcce9522e4c87d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E9=95=BF=E6=B1=9F?= Date: Wed, 22 Nov 2023 16:32:53 +0700 Subject: [PATCH 01/44] feat: add passkey tab --- packages/guard-core-v4/example.tsx | 5 ++-- .../src/Login/core/withPasskey/index.tsx | 10 +++++++ packages/guard-core-v4/src/Login/index.tsx | 30 +++++++++++++++---- .../guard-core-v4/src/Type/application.ts | 3 +- 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 packages/guard-core-v4/src/Login/core/withPasskey/index.tsx diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index 08bcdeb62..63ad6480f 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -5,12 +5,13 @@ import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '630ed3137dd6f2fd7001da24' + const appId = '655311b0aa01066bc8e2d599' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { // mode: GuardMode.Modal, - // lang: 'en-US' + // lang: 'en-US', + host: 'http://passkey.authing.localhost:3000' } const onLogin = (userInfo: User) => { diff --git a/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx b/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx new file mode 100644 index 000000000..0fe70af4f --- /dev/null +++ b/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx @@ -0,0 +1,10 @@ +import { React } from 'shim-react' + +import { Form } from 'shim-antd' + +interface LoginWithPasskeyProps {} + +export const LoginWithPasskey = (props: LoginWithPasskeyProps) => { + const [form] = Form.useForm() + return
test
+} diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index f4461a35f..109bd2d40 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -71,6 +71,7 @@ import { useLoginMultiple } from './hooks/useLoginMultiple' import { useGuardView } from '../Guard/core/hooks/useGuardView' import { LoginWithAuthingOtpPush } from './core/withAuthingOtpPush/index' +import { LoginWithPasskey } from './core/withPasskey' const { useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback } = React @@ -81,7 +82,8 @@ const inputWays = [ LoginMethods.AD, LoginMethods.LDAP, LoginMethods.AuthingOtpPush, - LoginMethods.EmailCode + LoginMethods.EmailCode, + LoginMethods.Passkey ] const qrcodeWays = [ LoginMethods.AppQr, @@ -735,6 +737,16 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ ) }, [ms, onLoginSuccess, t, backfillData, multipleInstance, agreements]) + const PasskeyTab = useMemo( + () => + ms?.includes(LoginMethods.Passkey) && ( + + + + ), + [ms] + ) + // 登录方式对应 tab Component const tabMap = useMemo(() => { return { @@ -742,9 +754,10 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ [LoginMethods.PhoneCode]: CodeTab, [LoginMethods.LDAP]: LdapTab, [LoginMethods.AD]: ADTab, - [LoginMethods.AuthingOtpPush]: AuthingOtpPushTab + [LoginMethods.AuthingOtpPush]: AuthingOtpPushTab, + [LoginMethods.Passkey]: PasskeyTab } - }, [PasswordTab, CodeTab, LdapTab, ADTab, AuthingOtpPushTab]) + }, [PasswordTab, CodeTab, LdapTab, ADTab, AuthingOtpPushTab, PasskeyTab]) const GeneralLoginComponent = useMemo(() => { const total = ms?.filter(tabName => @@ -753,12 +766,13 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ LoginMethods.PhoneCode, LoginMethods.LDAP, LoginMethods.AD, - LoginMethods.AuthingOtpPush + LoginMethods.AuthingOtpPush, + LoginMethods.Passkey ].includes(tabName) ) - if (total) { - return getSortTabs(total, config.defaultLoginMethod ?? '').map( + const sortedTable = getSortTabs(total, config.defaultLoginMethod ?? '') + const tabs = sortedTable.map( tabName => tabMap[ tabName as @@ -767,12 +781,16 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ | LoginMethods.LDAP | LoginMethods.AD | LoginMethods.AuthingOtpPush + | LoginMethods.Passkey ] ) + return tabs } return null }, [config.defaultLoginMethod, ms, tabMap]) + console.log('GeneralLoginComponent: ', GeneralLoginComponent) + const QrCodeTabMap = useMemo(() => { return { [LoginMethods.AppQr]: AppQrTab, diff --git a/packages/guard-core-v4/src/Type/application.ts b/packages/guard-core-v4/src/Type/application.ts index b24495b1c..8df636f62 100644 --- a/packages/guard-core-v4/src/Type/application.ts +++ b/packages/guard-core-v4/src/Type/application.ts @@ -13,7 +13,8 @@ export enum LoginMethods { WxMinQr = 'wechat-miniprogram-qrcode', // 对应社会化登录的 wechat:miniprogram:qrconnect(小程序扫码登录) AD = 'ad', // 对应企业身份源的 Windows AD 登录 WechatMpQrcode = 'wechatmp-qrcode', // 微信扫码关注登录 - AuthingOtpPush = 'authing-otp-push' // App 扫码登录 + AuthingOtpPush = 'authing-otp-push', // App 扫码登录 + Passkey = 'passkey' // passkey } export enum OIDCConnectionMode { From f6134a13c16e1e69ad82981a945f5e9cccca0d3f Mon Sep 17 00:00:00 2001 From: cj Date: Thu, 30 Nov 2023 09:07:32 +0700 Subject: [PATCH 02/44] update --- packages/guard-core-v4/example.tsx | 4 +- packages/guard-core-v4/package-lock.json | 30 +++++++--- packages/guard-core-v4/package.json | 1 + .../scripts/webpack.dev.config.js | 9 ++- .../src/Login/core/withPasskey/index.tsx | 55 ++++++++++++++++++- packages/guard-core-v4/src/Login/index.tsx | 2 - 6 files changed, 84 insertions(+), 17 deletions(-) diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index 63ad6480f..452455718 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -5,13 +5,13 @@ import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '655311b0aa01066bc8e2d599' + const appId = '65602089186aa850c5e21c9b' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { // mode: GuardMode.Modal, // lang: 'en-US', - host: 'http://passkey.authing.localhost:3000' + host: 'https://passkey.cj.local' } const onLogin = (userInfo: User) => { diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 0ff2f65a0..63cf90a78 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -6,10 +6,11 @@ "packages": { "": { "name": "@authing/guard-core", - "version": "4.5.0-alpha.1", + "version": "4.5.0", "license": "MIT", "dependencies": { - "authing-js-sdk": "^4.23.48", + "@github/webauthn-json": "^2.1.1", + "authing-js-sdk": "^4.23.49", "classnames": "^2.3.1", "i18next": "^22.4.11", "i18next-browser-languagedetector": "^7.0.1", @@ -51,6 +52,14 @@ "tslib": "^2.4.1" } }, + "node_modules/@github/webauthn-json": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@github/webauthn-json/-/webauthn-json-2.1.1.tgz", + "integrity": "sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ==", + "bin": { + "webauthn-json": "dist/bin/main.js" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -448,9 +457,9 @@ } }, "node_modules/authing-js-sdk": { - "version": "4.23.48", - "resolved": "https://registry.npmjs.org/authing-js-sdk/-/authing-js-sdk-4.23.48.tgz", - "integrity": "sha512-6uRk4Ii27mno5YjfVdjRrKTkL33Tb11IaxOMp8y2UnKJwALEa8S2vGE3FQzFohFEJrhKL7ozf8zEl7nMgr2q2w==", + "version": "4.23.49", + "resolved": "https://registry.npmjs.org/authing-js-sdk/-/authing-js-sdk-4.23.49.tgz", + "integrity": "sha512-W6qdHQxHRT8oWn52mH/XbN6wkTzxc1wRCbN43PTGtl2qGthY/i4JuiUu+fO9M1P+JJd2D3DwHqM4HfLMik6n3Q==", "dependencies": { "@fingerprintjs/fingerprintjs": "^3.4.2", "axios": "0.26.1", @@ -1872,6 +1881,11 @@ "tslib": "^2.4.1" } }, + "@github/webauthn-json": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@github/webauthn-json/-/webauthn-json-2.1.1.tgz", + "integrity": "sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ==" + }, "@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -2243,9 +2257,9 @@ "requires": {} }, "authing-js-sdk": { - "version": "4.23.48", - "resolved": "https://registry.npmjs.org/authing-js-sdk/-/authing-js-sdk-4.23.48.tgz", - "integrity": "sha512-6uRk4Ii27mno5YjfVdjRrKTkL33Tb11IaxOMp8y2UnKJwALEa8S2vGE3FQzFohFEJrhKL7ozf8zEl7nMgr2q2w==", + "version": "4.23.49", + "resolved": "https://registry.npmjs.org/authing-js-sdk/-/authing-js-sdk-4.23.49.tgz", + "integrity": "sha512-W6qdHQxHRT8oWn52mH/XbN6wkTzxc1wRCbN43PTGtl2qGthY/i4JuiUu+fO9M1P+JJd2D3DwHqM4HfLMik6n3Q==", "requires": { "@fingerprintjs/fingerprintjs": "^3.4.2", "axios": "0.26.1", diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index d26fb3cc1..fb0c5212d 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -18,6 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { + "@github/webauthn-json": "^2.1.1", "authing-js-sdk": "^4.23.49", "classnames": "^2.3.1", "i18next": "^22.4.11", diff --git a/packages/guard-core-v4/scripts/webpack.dev.config.js b/packages/guard-core-v4/scripts/webpack.dev.config.js index 3de190b12..84d3cfc9d 100644 --- a/packages/guard-core-v4/scripts/webpack.dev.config.js +++ b/packages/guard-core-v4/scripts/webpack.dev.config.js @@ -5,6 +5,7 @@ const webpackBaseConfigFn = require('./webpack.base.config') const { resolve } = require('./utils') const reactVersion = '16' +const fs = require('fs') module.exports = merge({}, webpackBaseConfigFn({ reactVersion @@ -28,8 +29,12 @@ module.exports = merge({}, webpackBaseConfigFn({ } }, devServer: { - host: 'localhost', - port: 8090, + https: { + key: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.key'), + cert: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.crt'), + }, + host: 'passkey.cj.local', + port: 8443, hot: true, open: true } diff --git a/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx b/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx index 0fe70af4f..587f6e609 100644 --- a/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx +++ b/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx @@ -1,10 +1,59 @@ import { React } from 'shim-react' +import { useState } from 'react' -import { Form } from 'shim-antd' +import { message } from 'shim-antd' +import axios from 'axios' +import { + CredentialRequestOptionsJSON, + create as createWebauthnCredential, + get as getWebauthnCredential +} from '@github/webauthn-json' +import { useGuardHttp } from '../../../_utils/guardHttp' interface LoginWithPasskeyProps {} export const LoginWithPasskey = (props: LoginWithPasskeyProps) => { - const [form] = Form.useForm() - return
test
+ const [webAuthn, setWebAuthn] = useState(null) + const { post, get } = useGuardHttp() + + const [abortController, setAbortController] = useState() + + const createAbortSignal = () => { + if (abortController) { + abortController.abort() + } + const controller = new AbortController() + setAbortController(controller) + return controller.signal + } + + const initializeLogin = async () => { + const { data } = await post('/api/v3/webauthn/login/initialize', {}) + return data + } + + const finalizeLogin = async (assertion: any, ticket: string) => { + const { data } = await post('/api/v3/webauthn/login/finalize', { + credential: assertion, + ticket + }) + return data + } + + const handleLogin = async () => { + const challenge = await initializeLogin() + challenge.mediation = 'required' as CredentialMediationRequirement + challenge.signal = createAbortSignal() + const ticket = challenge.ticket + const assertion = await getWebauthnCredential(challenge) + console.log(assertion) + const assertionResponse = await finalizeLogin(assertion, ticket) + alert(JSON.stringify(assertionResponse)) + } + + return ( +
+ +
+ ) } diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index 109bd2d40..77eb6e0a0 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -789,8 +789,6 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ return null }, [config.defaultLoginMethod, ms, tabMap]) - console.log('GeneralLoginComponent: ', GeneralLoginComponent) - const QrCodeTabMap = useMemo(() => { return { [LoginMethods.AppQr]: AppQrTab, From 4eed0880183522a662fc487630433f894aca6d57 Mon Sep 17 00:00:00 2001 From: xiaoliuing <2303686241@qq.com> Date: Thu, 30 Nov 2023 18:18:29 +0800 Subject: [PATCH 03/44] feat: update Passkey login --- package-lock.json | 15 ++++ .../scripts/webpack.dev.config.js | 64 ++++++++-------- .../Login/socialLogin/PasskeyButton/index.tsx | 73 +++++++++++++++++++ .../src/Login/socialLogin/index.tsx | 14 ++++ .../src/_utils/locales/en-us/login.json | 3 +- .../src/_utils/locales/ja-jp/login.json | 3 +- .../src/_utils/locales/zh-cn/login.json | 3 +- .../src/_utils/locales/zh-tw/login.json | 3 +- 8 files changed, 144 insertions(+), 34 deletions(-) create mode 100644 packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx diff --git a/package-lock.json b/package-lock.json index 4a9919da0..432381642 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3855,6 +3855,14 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "node_modules/@github/webauthn-json": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@github/webauthn-json/-/webauthn-json-2.1.1.tgz", + "integrity": "sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ==", + "bin": { + "webauthn-json": "dist/bin/main.js" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -18665,6 +18673,7 @@ "version": "4.5.0", "license": "MIT", "dependencies": { + "@github/webauthn-json": "^2.1.1", "authing-js-sdk": "^4.23.49", "classnames": "^2.3.1", "i18next": "^22.4.11", @@ -19739,6 +19748,7 @@ "@authing/guard-core": { "version": "file:packages/guard-core-v4", "requires": { + "@github/webauthn-json": "^2.1.1", "@types/lodash": "^4.14.175", "@types/throttle-debounce": "^5.0.0", "@types/ua-parser-js": "^0.7.36", @@ -21649,6 +21659,11 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "@github/webauthn-json": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@github/webauthn-json/-/webauthn-json-2.1.1.tgz", + "integrity": "sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ==" + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", diff --git a/packages/guard-core-v4/scripts/webpack.dev.config.js b/packages/guard-core-v4/scripts/webpack.dev.config.js index 84d3cfc9d..95e9dd2ff 100644 --- a/packages/guard-core-v4/scripts/webpack.dev.config.js +++ b/packages/guard-core-v4/scripts/webpack.dev.config.js @@ -7,35 +7,39 @@ const { resolve } = require('./utils') const reactVersion = '16' const fs = require('fs') -module.exports = merge({}, webpackBaseConfigFn({ - reactVersion -}), { - mode: 'development', - entry: resolve('example.tsx'), - output: { - filename: 'guard.min.js', - path: resolve(`dist/esm-react${reactVersion}`), - library: { - type: 'module' - } - }, - experiments: { - outputModule: true - }, - resolve: { - fallback: { - fs: false, - crypto: false - } - }, - devServer: { - https: { - key: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.key'), - cert: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.crt'), +module.exports = merge( + {}, + webpackBaseConfigFn({ + reactVersion + }), + { + mode: 'development', + entry: resolve('example.tsx'), + output: { + filename: 'guard.min.js', + path: resolve(`dist/esm-react${reactVersion}`), + library: { + type: 'module' + } + }, + experiments: { + outputModule: true }, - host: 'passkey.cj.local', - port: 8443, - hot: true, - open: true + resolve: { + fallback: { + fs: false, + crypto: false + } + }, + devServer: { + // https: { + // key: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.key'), + // cert: fs.readFileSync('/Users/jayl/Code/authing/Guard/test.local.crt'), + // }, + // host: 'passkey.cj.local', + port: 8443, + hot: true, + open: true + } } -}) +) diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx new file mode 100644 index 000000000..a1021930f --- /dev/null +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -0,0 +1,73 @@ +import { React } from 'shim-react' +import { useState } from 'react' + +import { message } from 'shim-antd' +import axios from 'axios' +import { + CredentialRequestOptionsJSON, + create as createWebauthnCredential, + get as getWebauthnCredential +} from '@github/webauthn-json' +import { useGuardHttp } from '../../../_utils/guardHttp' +import { GuardButton } from '../../../GuardButton' +import { IconFont } from '../../../IconFont' +import { useTranslation } from 'react-i18next' + +export const PasskeyButton = () => { + const [webAuthn, setWebAuthn] = useState(null) + const { post, get } = useGuardHttp() + + const [abortController, setAbortController] = useState() + + const { t } = useTranslation() + + const createAbortSignal = () => { + if (abortController) { + abortController.abort() + } + const controller = new AbortController() + setAbortController(controller) + return controller.signal + } + + const initializeLogin = async () => { + const { data } = await post('/api/v3/webauthn/login/initialize', {}) + return data + } + + const finalizeLogin = async (assertion: any, ticket: string) => { + const { data } = await post('/api/v3/webauthn/login/finalize', { + credential: assertion, + ticket + }) + return data + } + + const handleLogin = async () => { + const challenge = await initializeLogin() + challenge.mediation = 'required' as CredentialMediationRequirement + challenge.signal = createAbortSignal() + const ticket = challenge.ticket + const assertion = await getWebauthnCredential(challenge) + console.log(assertion) + const assertionResponse = await finalizeLogin(assertion, ticket) + alert(JSON.stringify(assertionResponse)) + } + + return ( + + } + > + {t('login.loginWithPasskey')} + + ) +} diff --git a/packages/guard-core-v4/src/Login/socialLogin/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/index.tsx index 72969a067..286e9c0a0 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/index.tsx @@ -38,6 +38,8 @@ import { ApplicationConfig, SocialConnectionItem } from '../../Type/application' import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts' +import { PasskeyButton } from './PasskeyButton' + const { useEffect } = React export interface SocialLoginProps { @@ -293,6 +295,17 @@ export const SocialLogin: React.FC = ({ ) ) + const otherLogin = ( +
+ +
+ ) + return ( <> {!noLoginMethods && ( @@ -309,6 +322,7 @@ export const SocialLogin: React.FC = ({ className="g2-guard-full-width-space" > {!publicConfig?.ssoPageComponentDisplay.idpBtns || idp} + {otherLogin} {!publicConfig?.ssoPageComponentDisplay.socialLoginBtns || socialLogin} diff --git a/packages/guard-core-v4/src/_utils/locales/en-us/login.json b/packages/guard-core-v4/src/_utils/locales/en-us/login.json index 7415e9d5f..911421546 100644 --- a/packages/guard-core-v4/src/_utils/locales/en-us/login.json +++ b/packages/guard-core-v4/src/_utils/locales/en-us/login.json @@ -111,6 +111,7 @@ "requireError": "Unable to satisfy request error", "hardwareSupport": "Hardware not supported", "verifyCodeTip": "Try another", + "loginWithPasskey": "Sign in with Passkey", "resetPassword": { "pleaseInputPassword": "Please input a password", "checkPasswordDiff": "Please enter a consistent password", @@ -127,4 +128,4 @@ "successTip": "Password reset succeeded", "backLogin": "Seconds will automatically jump to the login page" } -} +} \ No newline at end of file diff --git a/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json b/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json index 123ffda5b..11a2cc800 100644 --- a/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json +++ b/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json @@ -111,6 +111,7 @@ "requireError": "要求エラーを満たすことができません", "hardwareSupport": "ハードウェアはサポートされていません", "verifyCodeTip": "別の画像を表示", + "loginWithPasskey": "パスキーを使用してログインする", "resetPassword": { "pleaseInputPassword": "パスワードを入力してください", "checkPasswordDiff": "一貫したパスワードを入力してください", @@ -127,4 +128,4 @@ "successTip": "パスワードのリセットに成功しました", "backLogin": "秒ログインページが自動的にジャンプされます" } -} +} \ No newline at end of file diff --git a/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json b/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json index 70d4a8f13..f3442c939 100644 --- a/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json +++ b/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json @@ -111,6 +111,7 @@ "requireError": "无法满足要求错误", "hardwareSupport": "硬件不支持", "verifyCodeTip": "看不清?换一张", + "loginWithPasskey": "使用 Passkey 登录", "resetPassword": { "pleaseInputPassword": "请输入密码", "checkPasswordDiff": "请输入一致的密码", @@ -127,4 +128,4 @@ "successTip": "密码重置成功", "backLogin": "秒后将自动跳转登录页" } -} +} \ No newline at end of file diff --git a/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json b/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json index c7475fb74..1fd719436 100644 --- a/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json +++ b/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json @@ -111,6 +111,7 @@ "requireError": "無法滿足要求錯誤", "hardwareSupport": "硬件不支持", "verifyCodeTip": "看不清?換一張", + "loginWithPasskey": "使用 Passkey 登入", "resetPassword": { "pleaseInputPassword": "請輸入密碼", "checkPasswordDiff": "請輸入一致的密碼", @@ -127,4 +128,4 @@ "successTip": "密碼重置成功", "backLogin": "秒後將自動跳轉登入頁" } -} +} \ No newline at end of file From 3e2829e7ac5161ceddd23e8eeed18ff478f21e9b Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Fri, 8 Dec 2023 17:22:59 +0800 Subject: [PATCH 04/44] =?UTF-8?q?feat:=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95=E6=8E=A5=E5=85=A5=E5=86=85?= =?UTF-8?q?=E5=B5=8C=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangePassword/core/firstLoginReset.tsx | 21 ++- .../src/Guard/core/renderContext.tsx | 42 ++++- .../src/Login/core/withWeComQrcode.tsx | 143 ++++++++++++++++++ packages/guard-core-v4/src/Login/index.tsx | 91 ++++++++++- .../src/Login/socialLogin/index.tsx | 41 +---- .../guard-core-v4/src/Type/application.ts | 9 +- packages/guard-core-v4/src/Type/window.d.ts | 4 + packages/guard-core-v4/src/_utils/index.ts | 16 ++ .../src/_utils/locales/en-us/login.json | 3 +- .../src/_utils/locales/ja-jp/login.json | 3 +- .../src/_utils/locales/zh-cn/login.json | 3 +- .../src/_utils/locales/zh-tw/login.json | 3 +- 12 files changed, 314 insertions(+), 65 deletions(-) create mode 100644 packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx create mode 100644 packages/guard-core-v4/src/Type/window.d.ts diff --git a/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx b/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx index 5f88d2b2c..dfb16bff7 100644 --- a/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx +++ b/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx @@ -126,17 +126,16 @@ export const FirstLoginReset: React.FC = ({ }} autoComplete="off" > - {initData?.enableFirstLoginResetPasswordVerifyPhone && - initData?.phone && ( - - - - )} + {initData?.enableFirstLoginResetPasswordVerifyPhone && initData?.phone && ( + + + + )} { type: T & string @@ -77,6 +81,7 @@ export const RenderContext: React.FC<{ const [error, setError] = useState() const [isAuthFlow, setIsAuthFlow] = useState(true) const [i18nInit, setI18nInit] = useState(false) + const scriptNodes = useRef>({}) const appId = useInitAppId(guardProps.appId, guardProps.authClient, setError) const [defaultLanguageConfig, setDefaultLanguageConfig] = useState() @@ -224,6 +229,41 @@ export const RenderContext: React.FC<{ setCdnBase(publicConfig.cdnBase) }, [appId, finallyConfig]) + // 特殊脚本注入 + useEffect(() => { + if (!publicConfig) { + return + } + const guardDocument = getGuardDocument() + // TODO: 脚本后续上传到 oss + // if ( + // publicConfig.qrcodeTabsSettings?.dingtalk && + // !scriptNodes.current?.dingtalk + // ) { + // const dingdingScriptDom = document.createElement('script') + // dingdingScriptDom.innerHTML = + // '!function(window,document){function d(a){var e,c=document.createElement("iframe"),d="https://login.dingtalk.com/login/qrcode.htm?goto="+a.goto;d+= a.style ? "&style="+encodeURIComponent(a.style):"",d+= a.href ? "&href="+a.href:"",c.src = d,c.frameBorder = "0",c.allowTransparency = "true",c.scrolling = "no",c.width = a.width ? a.width+\'px\':"365px",c.height = a.height ? a.height+\'px\':"400px",c.style.scale="0.664",e = document.getElementById(a.id),e.innerHTML = "",e.appendChild(c);return c}window.DDLogin = d}(window,document);' + // guardDocument.body.appendChild(dingdingScriptDom) + // scriptNodes.current = Object.assign(scriptNodes.current, { + // dingtalk: dingdingScriptDom + // }) + // } + + if ( + publicConfig.qrcodeTabsSettings?.['wechatwork-corp-qrconnect'] && + !scriptNodes.current?.weCom + ) { + const weComScriptDom = document.createElement('script') + // weComScriptDom.innerHTML = `!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).WwLogin=t()}(this,(function(){"use strict";var e=["work.weixin.qq.com","tencent.com"],t={sso:"/wwopen/sso/qrConnect",tww:"/login/wwLogin/sso/qrConnect",native:"/native/sso/qrConnect",twxg:"/login/wwLogin/sso/qrConnect"},n="1.2.7";return function(){function o(e){this.options=e,this.options=e,this.createFrame()}return o.prototype.destroyed=function(){console.log("WwLogin had destroyed."),window.removeEventListener("message",this.onPostMessage)},o.prototype.getUrl=function(e){var o=[];Object.keys(e).forEach((function(t){var n=e[t];[void 0,null].indexOf(n)>-1||-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n))})),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return/tencent\.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&"))},o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);this.frame.src=this.getUrl(this.options),this.frame.frameBorder="0",this.frame.allowTransparency="true",this.frame.scrolling="no",this.frame.width="158px",this.frame.height="158px",t.innerHTML="",t.appendChild(this.frame),this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&(window.addEventListener("message",e.onPostMessage),e.frame.contentWindow.postMessage("ask_usePostMessage","*"))}}},o.prototype.onPostMessage=function(t){if(e.filter((function(e){return new RegExp("".concat(e,"$")).test(t.origin)})).length){var n=t.data;if(n&&"string"==typeof n&&/^http/.test(n)){var b = document.createElement('iframe');b.src = n; b.style.display = 'none';document.body.appendChild(b)}}},o}()}));` + weComScriptDom.innerHTML = + '!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?(module.exports=t()):"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).WwLogin=t())})(this,function(){"use strict";var e=["work.weixin.qq.com","tencent.com"],t={sso:"/wwopen/sso/qrConnect",tww:"/login/wwLogin/sso/qrConnect",native:"/native/sso/qrConnect",twxg:"/login/wwLogin/sso/qrConnect"},n="1.2.7";return(function(){function o(e){(this.options=e),(this.options=e),this.createFrame()}return((o.prototype.destroyed=function(){console.log("WwLogin had destroyed."),window.removeEventListener("message",this.onPostMessage)}),(o.prototype.getUrl=function(e){var o=[];Object.keys(e).forEach(function(t){var n=e[t];[void 0,null].indexOf(n)>-1||(-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n)))}),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return(/tencent.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&")))}),(o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);(this.frame.src=this.getUrl(this.options)),(this.frame.frameBorder="0"),(this.frame.allowTransparency="true"),(this.frame.scrolling="no"),(this.frame.width="158px"),(this.frame.height="158px"),(t.innerHTML=""),t.appendChild(this.frame),(this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&e.frame.contentWindow.postMessage("ask_usePostMessage","*")})}}),o)})()});' + guardDocument.body.appendChild(weComScriptDom) + scriptNodes.current = Object.assign(scriptNodes.current, { + weCom: weComScriptDom + }) + } + }, [publicConfig]) + // I18n useEffect(() => { if (guardPageConfig && publicConfig && defaultMergedConfig) { diff --git a/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx new file mode 100644 index 000000000..88d1374f8 --- /dev/null +++ b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx @@ -0,0 +1,143 @@ +import { message } from 'shim-antd' + +import { React } from 'shim-react' + +import qs from 'qs' + +import { CodeAction } from '../..' + +import { getGuardWindow } from '../../Guard/core/useAppendConfig' + +import { ShieldSpin } from '../../ShieldSpin' + +import { getVersion, isSpecialBrowser, isWeComOrigin } from '../../_utils' + +import { + useGuardAppId, + useGuardFinallyConfig, + useGuardHttpClient, + useGuardPublicConfig, + useGuardTenantId +} from '../../_utils/context' + +import { i18n } from '../../_utils/locales' + +const version = getVersion() + +const { useCallback, useEffect } = React +export const LoginWithWeComQrcode = (props: any) => { + const { QRConfig } = props + + const WwLogin = window.WwLogin + + const { get } = useGuardHttpClient() + + const tenantId = useGuardTenantId() + + const appId = useGuardAppId() + + const config = useGuardFinallyConfig() + + const publicConfig = useGuardPublicConfig() + const fetchQrcode = useCallback(async () => { + const query: Record = { + from_guard: '1', + app_id: appId, + guard_version: `Guard@${version}`, + ...(tenantId && { tenant_id: tenantId }) + } + if (config?.isHost) { + delete query.from_guard + query.from_hosted_guard = '1' + + if (isSpecialBrowser()) { + query.redirected = '1' + const guardWindow = getGuardWindow() + if (guardWindow) { + // 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数 + query.redirect_url = qs.parse(guardWindow.location.search)?.[ + 'finish_login_url' + ] + } + } + } + + // let redirect_uri = encodeURIComponent( + // `https://console.authing.localhost${QRConfig.redirectUrl}` + // ) + + // 初始化iframe二维码 + new WwLogin({ + id: 'weCom_qrcode_wrapper', + appid: QRConfig.corpId, + agentid: QRConfig.agentId, + redirect_uri: encodeURIComponent( + `${QRConfig.redirectUrl}?${qs.stringify(query)}` + ), + // redirect_uri, + href: `${publicConfig?.cdnBase}/guard-assets/wecom_authing.css`, //企业微信二维码样式文件 + lang: i18n.language.includes('zh') ? 'zh' : 'en' + }) + }, [ + QRConfig, + WwLogin, + appId, + config?.isHost, + publicConfig?.cdnBase, + tenantId + ]) + + useEffect(() => { + fetchQrcode() + }, [fetchQrcode]) + + useEffect(() => { + const messageEvent = async (event: MessageEvent) => { + if (isWeComOrigin(event)) { + try { + // 拦截query信息 + const query = new URL(event.data).search + // 向应用域名下发起认证验证请求 + const res = await get( + `/api/v1/qrcode/${QRConfig.identifier}/verify${query}` + ) + if (res.code === 200) { + props.onLoginSuccess(res.data) + } else { + const handMode = res?.onGuardHandling?.() + // 向上层抛出错误 + handMode === CodeAction.RENDER_MESSAGE && + props.onLoginFailed(res.code, res.data) + } + // TODO 通过微信认证校验 获取authing认证数据 + // const { data } = await Axios(event.data, { + // headers: getHeaders(), + // }) + // if (data?.code === 200) { + // props.onLoginSuccess(data.data) + // } else { + // const res = responseIntercept(data) + // const handMode = res?.onGuardHandling?.() + // // 向上层抛出错误 + // handMode === CodeAction.RENDER_MESSAGE && + // props.onLoginFailed(res.code, data) + // } + } catch (e: any) { + message.error(e.message) + } + } + } + + window.addEventListener('message', messageEvent, false) + + return () => { + window.removeEventListener('message', messageEvent, false) + } + }) + + return ( +
+ +
+ ) +} diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index f4461a35f..2e0268ae0 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -46,7 +46,12 @@ import { useGuardTenantProvider } from '../_utils/context' -import { getPasswordIdentify, getSortTabs } from '../_utils' +import { + CodeAction, + getPasswordIdentify, + getSortTabs, + isWeComOrigin +} from '../_utils' import { LoginWithVerifyCode, SpecifyCodeMethods } from './core/withVerifyCode' @@ -72,6 +77,12 @@ import { useGuardView } from '../Guard/core/hooks/useGuardView' import { LoginWithAuthingOtpPush } from './core/withAuthingOtpPush/index' +import { usePostMessage } from './socialLogin/postMessage' + +import { LoginWithWeComQrcode } from './core/withWeComQrcode' + +import { getGuardWindow } from 'src/Guard/core/useAppendConfig' + const { useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback } = React @@ -86,7 +97,8 @@ const inputWays = [ const qrcodeWays = [ LoginMethods.AppQr, LoginMethods.WxMinQr, - LoginMethods.WechatMpQrcode + LoginMethods.WechatMpQrcode, + LoginMethods.WechatworkCorpQrconnect ] const useMethods = (config: any) => { @@ -161,6 +173,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ const { t } = useTranslation() + const onMessage = usePostMessage() + const [loginWay, setLoginWay] = useState( specifyDefaultLoginMethod || defaultMethod ) @@ -254,9 +268,11 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ return defaultQrWay } if ( - [LoginMethods.WechatMpQrcode, LoginMethods.WxMinQr].includes( - defaultMethod - ) + [ + LoginMethods.WechatMpQrcode, + LoginMethods.WxMinQr, + LoginMethods.WechatworkCorpQrconnect + ].includes(defaultMethod) ) { const id = qrcodeTabsSettings?.[defaultMethod as LoginMethods]?.find( (i: { id: string; title: string; isDefault?: boolean | undefined }) => @@ -717,6 +733,24 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ [canLoop, multipleInstance, onLoginSuccess, t] ) + const WeComQrTab = useCallback( + (item: QrCodeItem) => { + return ( + + + + ) + }, + [canLoop, multipleInstance, onLoginSuccess, t] + ) + const AuthingOtpPushTab = useMemo(() => { return ( ms?.includes(LoginMethods.AuthingOtpPush) && ( @@ -777,14 +811,18 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ return { [LoginMethods.AppQr]: AppQrTab, [LoginMethods.WechatMpQrcode]: WechatMpQrTab, - [LoginMethods.WxMinQr]: WxMiniQrTab + [LoginMethods.WxMinQr]: WxMiniQrTab, + [LoginMethods.WechatworkCorpQrconnect]: WeComQrTab } }, [AppQrTab, WechatMpQrTab, WxMiniQrTab]) const CodeLoginComponent = useMemo(() => { const qrCodeMap: { [name: string]: { - type: LoginMethods.WechatMpQrcode | LoginMethods.WxMinQr + type: + | LoginMethods.WechatMpQrcode + | LoginMethods.WxMinQr + | LoginMethods.WechatworkCorpQrconnect title: string id: string } @@ -793,7 +831,10 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ Object.keys(qrcodeTabsSettings).forEach(key => { qrcodeTabsSettings[key as LoginMethods].forEach(item => { qrCodeMap[item.id] = { - type: key as LoginMethods.WechatMpQrcode | LoginMethods.WxMinQr, + type: key as + | LoginMethods.WechatMpQrcode + | LoginMethods.WxMinQr + | LoginMethods.WechatworkCorpQrconnect, title: item.title, id: item.id } @@ -831,6 +872,40 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ defaultMethod ]) + useEffect(() => { + const onPostMessage = (evt: MessageEvent) => { + // 去掉钉钉和企微域下的postmessage处理 由他们内部自己监听的message控制 避免重复触发 + if (isWeComOrigin(evt)) return + const res = onMessage(evt) + if (!res) return + + // 更新本次登录方式 + multipleInstance && multipleInstance.setLoginWay('input', 'social') + + const { code, data, onGuardHandling } = res + if (code === 200) { + onLoginSuccess(data) + } else { + const handMode = onGuardHandling?.() + // 向上层抛出错误 + handMode === CodeAction.RENDER_MESSAGE && onLoginFailed(code, data) + } + } + + const guardWindow = getGuardWindow() + // 如果有第三方身份源开启监听 + if ( + socialConnectionObjs.length > 0 || + enterpriseConnectionObjs.length > 0 + ) { + guardWindow?.addEventListener('message', onPostMessage) + } + + return () => { + guardWindow?.removeEventListener('message', onPostMessage) + } + }, [onLoginFailed, multipleInstance, onLoginSuccess, onMessage]) + return (
diff --git a/packages/guard-core-v4/src/Login/socialLogin/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/index.tsx index 72969a067..7fc1968ff 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/index.tsx @@ -22,10 +22,6 @@ import { useGuardPublicConfig, useGuardTenantId } from '../../_utils/context' import { IdpButton } from './IdpButton' -import { usePostMessage } from './postMessage' - -import { CodeAction } from '../../_utils/responseManagement/interface' - import { getVersion } from '../../_utils' import { GuardLocalConfig } from '../../Guard' @@ -38,8 +34,6 @@ import { ApplicationConfig, SocialConnectionItem } from '../../Type/application' import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts' -const { useEffect } = React - export interface SocialLoginProps { appId: string config: GuardLocalConfig @@ -57,11 +51,8 @@ export interface SocialLoginProps { export const SocialLogin: React.FC = ({ appId, config, - onLoginFailed, - onLoginSuccess, enterpriseConnectionObjs, - socialConnectionObjs, - multipleInstance + socialConnectionObjs }) => { const noLoginMethods = !config?.loginMethods?.length @@ -73,38 +64,8 @@ export const SocialLogin: React.FC = ({ const { isPhoneMedia } = useMediaSize() - const onMessage = usePostMessage() - const tenantId = useGuardTenantId() - useEffect(() => { - const onPostMessage = (evt: MessageEvent) => { - const res = onMessage(evt) - if (!res) return - - // 更新本次登录方式 - multipleInstance && multipleInstance.setLoginWay('input', 'social') - - const { code, data, onGuardHandling } = res - - if (code === 200) { - onLoginSuccess(data) - } else { - const handMode = onGuardHandling?.() - // 向上层抛出错误 - handMode === CodeAction.RENDER_MESSAGE && - onLoginFailed(code, data, evt?.data?.message) - } - } - - const guardWindow = getGuardWindow() - - guardWindow?.addEventListener('message', onPostMessage) - return () => { - guardWindow?.removeEventListener('message', onPostMessage) - } - }, [onLoginFailed, multipleInstance, onLoginSuccess, onMessage]) - const idpButtons = enterpriseConnectionObjs.map((i: any) => { return ( > diff --git a/packages/guard-core-v4/src/Type/window.d.ts b/packages/guard-core-v4/src/Type/window.d.ts new file mode 100644 index 000000000..73c62b9c2 --- /dev/null +++ b/packages/guard-core-v4/src/Type/window.d.ts @@ -0,0 +1,4 @@ +interface Window { + DDLogin: any + WwLogin: any +} diff --git a/packages/guard-core-v4/src/_utils/index.ts b/packages/guard-core-v4/src/_utils/index.ts index f423ad8cf..ed9c5c91b 100644 --- a/packages/guard-core-v4/src/_utils/index.ts +++ b/packages/guard-core-v4/src/_utils/index.ts @@ -849,6 +849,22 @@ export const isDisabled = ( return disabled } +// 企微域 check http://wwcdn.weixin.qq.com/node/wework/wwopen/js/wwLogin-1.2.7.js +export const isWeComOrigin = (event: MessageEvent) => { + const originPages = ['work.weixin.qq.com', 'tencent.com'] + if ( + originPages.filter(function (origin) { + return new RegExp(''.concat(origin, '$')).test(event.origin) + }).length + ) { + let n = event.data + if (n && 'string' == typeof n && /^http/.test(n)) { + return true + } + } + return false +} + export * from './popupCenter' export * from './clipboard' diff --git a/packages/guard-core-v4/src/_utils/locales/en-us/login.json b/packages/guard-core-v4/src/_utils/locales/en-us/login.json index 7415e9d5f..4cddaac50 100644 --- a/packages/guard-core-v4/src/_utils/locales/en-us/login.json +++ b/packages/guard-core-v4/src/_utils/locales/en-us/login.json @@ -126,5 +126,6 @@ "successTipMsg": "You can continue to log in with your new password", "successTip": "Password reset succeeded", "backLogin": "Seconds will automatically jump to the login page" - } + }, + "wecomScanLogin":"Enterprise WeChat scan code to log in" } diff --git a/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json b/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json index 123ffda5b..a699e923c 100644 --- a/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json +++ b/packages/guard-core-v4/src/_utils/locales/ja-jp/login.json @@ -126,5 +126,6 @@ "successTipMsg": "新しいパスワードを使用してログインを続けることができます", "successTip": "パスワードのリセットに成功しました", "backLogin": "秒ログインページが自動的にジャンプされます" - } + }, + "wecomScanLogin":"エンタープライズ WeChat ログイン" } diff --git a/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json b/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json index 70d4a8f13..4354f44c3 100644 --- a/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json +++ b/packages/guard-core-v4/src/_utils/locales/zh-cn/login.json @@ -126,5 +126,6 @@ "successTipMsg": "你可以使用新密码继续登录", "successTip": "密码重置成功", "backLogin": "秒后将自动跳转登录页" - } + }, + "wecomScanLogin":"企业微信扫码登录" } diff --git a/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json b/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json index c7475fb74..5a1ef7e73 100644 --- a/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json +++ b/packages/guard-core-v4/src/_utils/locales/zh-tw/login.json @@ -126,5 +126,6 @@ "successTipMsg": "你可以使用新密碼繼續登入", "successTip": "密碼重置成功", "backLogin": "秒後將自動跳轉登入頁" - } + }, + "wecomScanLogin":"企業微信掃碼登入" } From 2c49f9e2c6c8f88b20cc94ee1f05c3a699d9fb81 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Wed, 20 Dec 2023 13:56:55 +0800 Subject: [PATCH 05/44] =?UTF-8?q?feat:=E4=BC=81=E5=BE=AE=E5=86=85=E5=B5=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/example.tsx | 3 +- .../ChangePassword/core/firstLoginReset.tsx | 21 ++--- .../src/Guard/core/renderContext.tsx | 4 +- .../src/Login/core/withWeComQrcode.tsx | 85 ++++++++++++------- packages/guard-core-v4/src/Login/index.tsx | 14 ++- packages/guard-core-v4/src/Login/styles.less | 9 +- 6 files changed, 89 insertions(+), 47 deletions(-) diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index 7b232dc5d..70b357c8a 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -5,12 +5,13 @@ import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '655c7e25f42de46d31de26fd' + const appId = '63bcfede094f5e7d917d238a' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { // mode: GuardMode.Modal, // lang: 'en-US' + host: 'http://1.authing.localhost:3000' } const onLogin = (userInfo: User) => { diff --git a/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx b/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx index dfb16bff7..5f88d2b2c 100644 --- a/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx +++ b/packages/guard-core-v4/src/ChangePassword/core/firstLoginReset.tsx @@ -126,16 +126,17 @@ export const FirstLoginReset: React.FC = ({ }} autoComplete="off" > - {initData?.enableFirstLoginResetPasswordVerifyPhone && initData?.phone && ( - - - - )} + {initData?.enableFirstLoginResetPasswordVerifyPhone && + initData?.phone && ( + + + + )} -1||-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n))})),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return/tencent\.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&"))},o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);this.frame.src=this.getUrl(this.options),this.frame.frameBorder="0",this.frame.allowTransparency="true",this.frame.scrolling="no",this.frame.width="158px",this.frame.height="158px",t.innerHTML="",t.appendChild(this.frame),this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&(window.addEventListener("message",e.onPostMessage),e.frame.contentWindow.postMessage("ask_usePostMessage","*"))}}},o.prototype.onPostMessage=function(t){if(e.filter((function(e){return new RegExp("".concat(e,"$")).test(t.origin)})).length){var n=t.data;if(n&&"string"==typeof n&&/^http/.test(n)){var b = document.createElement('iframe');b.src = n; b.style.display = 'none';document.body.appendChild(b)}}},o}()}));` weComScriptDom.innerHTML = - '!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?(module.exports=t()):"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).WwLogin=t())})(this,function(){"use strict";var e=["work.weixin.qq.com","tencent.com"],t={sso:"/wwopen/sso/qrConnect",tww:"/login/wwLogin/sso/qrConnect",native:"/native/sso/qrConnect",twxg:"/login/wwLogin/sso/qrConnect"},n="1.2.7";return(function(){function o(e){(this.options=e),(this.options=e),this.createFrame()}return((o.prototype.destroyed=function(){console.log("WwLogin had destroyed."),window.removeEventListener("message",this.onPostMessage)}),(o.prototype.getUrl=function(e){var o=[];Object.keys(e).forEach(function(t){var n=e[t];[void 0,null].indexOf(n)>-1||(-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n)))}),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return(/tencent.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&")))}),(o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);(this.frame.src=this.getUrl(this.options)),(this.frame.frameBorder="0"),(this.frame.allowTransparency="true"),(this.frame.scrolling="no"),(this.frame.width="158px"),(this.frame.height="158px"),(t.innerHTML=""),t.appendChild(this.frame),(this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&e.frame.contentWindow.postMessage("ask_usePostMessage","*")})}}),o)})()});' + '!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?(module.exports=t()):"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).WwLogin=t())})(this,function(){"use strict";var e=["work.weixin.qq.com","tencent.com"],t={sso:"/wwopen/sso/qrConnect",tww:"/login/wwLogin/sso/qrConnect",native:"/native/sso/qrConnect",twxg:"/login/wwLogin/sso/qrConnect"},n="1.2.7";return(function(){function o(e){(this.options=e),(this.options=e),this.createFrame()}return((o.prototype.destroyed=function(){console.log("WwLogin had destroyed."),window.removeEventListener("message",this.onPostMessage)}),(o.prototype.getUrl=function(e){var o=[];Object.keys(e).forEach(function(t){var n=e[t];[void 0,null].indexOf(n)>-1||(-1!==["string","number","boolean"].indexOf(typeof n)&&"id"!==t&&o.push("".concat(t,"=").concat(n)))}),o.push("version=".concat(n)),o.push("login_type=jssdk");var s=t[e.business_type||"sso"];if(!s)throw new Error("Argument business_type not match. Current version is ".concat(n,"."));var i="https://open.work.weixin.qq.com";return(/tencent.com$/.test(window.location.host)&&(i="https://open.wecom.tencent.com"),"".concat(i).concat(s,"?").concat(o.join("&")))}),(o.prototype.createFrame=function(){var e=this;if(this.options.is_mobile)window.location.href=this.getUrl(this.options);else{this.frame=document.createElement("iframe");var t=document.getElementById(this.options.id);(this.frame.src=this.getUrl(this.options)),(this.frame.frameBorder="0"),(this.frame.allowTransparency="true"),(this.frame.scrolling="no"),(this.frame.width="100%"),(this.frame.height="194px"),(t.innerHTML=""),t.appendChild(this.frame),(this.frame.onload=function(){e.frame.contentWindow.postMessage&&window.addEventListener&&e.frame.contentWindow.postMessage("ask_usePostMessage","*")})}}),o)})()});' guardDocument.body.appendChild(weComScriptDom) scriptNodes.current = Object.assign(scriptNodes.current, { weCom: weComScriptDom diff --git a/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx index 88d1374f8..96de02e0d 100644 --- a/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx @@ -4,16 +4,17 @@ import { React } from 'shim-react' import qs from 'qs' -import { CodeAction } from '../..' +import { CodeAction, LoginMethods } from '../..' import { getGuardWindow } from '../../Guard/core/useAppendConfig' import { ShieldSpin } from '../../ShieldSpin' -import { getVersion, isSpecialBrowser, isWeComOrigin } from '../../_utils' +import { isSpecialBrowser, isWeComOrigin } from '../../_utils' import { useGuardAppId, + useGuardEvents, useGuardFinallyConfig, useGuardHttpClient, useGuardPublicConfig, @@ -22,14 +23,21 @@ import { import { i18n } from '../../_utils/locales' +import { useGuardAuthClient } from '../../Guard/authClient' + +import { getVersion } from '../../_utils/getVersion' + const version = getVersion() -const { useCallback, useEffect } = React +const { useCallback, useEffect, useState } = React + export const LoginWithWeComQrcode = (props: any) => { - const { QRConfig } = props + const { QRConfig, id } = props const WwLogin = window.WwLogin + const [loading, setLoading] = useState(true) + const { get } = useGuardHttpClient() const tenantId = useGuardTenantId() @@ -39,6 +47,11 @@ export const LoginWithWeComQrcode = (props: any) => { const config = useGuardFinallyConfig() const publicConfig = useGuardPublicConfig() + + const events = useGuardEvents() + + const authClient = useGuardAuthClient() + const fetchQrcode = useCallback(async () => { const query: Record = { from_guard: '1', @@ -62,27 +75,32 @@ export const LoginWithWeComQrcode = (props: any) => { } } - // let redirect_uri = encodeURIComponent( - // `https://console.authing.localhost${QRConfig.redirectUrl}` - // ) - // 初始化iframe二维码 - new WwLogin({ - id: 'weCom_qrcode_wrapper', + const wwInstance = new WwLogin({ + id: `weCom_qrcode_wrapper-${id}`, appid: QRConfig.corpId, agentid: QRConfig.agentId, redirect_uri: encodeURIComponent( `${QRConfig.redirectUrl}?${qs.stringify(query)}` ), // redirect_uri, - href: `${publicConfig?.cdnBase}/guard-assets/wecom_authing.css`, //企业微信二维码样式文件 + href: `${publicConfig?.cdnBase}/guard-assets/wrp_code_friesland.css`, //企业微信二维码样式文件 lang: i18n.language.includes('zh') ? 'zh' : 'en' }) + + wwInstance.frame.onload = (event: Event) => { + setLoading(false) + wwInstance.frame.contentWindow.postMessage && + wwInstance.frame.contentWindow.postMessage('ask_usePostMessage', '*') + } }, [ - QRConfig, + QRConfig.agentId, + QRConfig.corpId, + QRConfig.redirectUrl, WwLogin, appId, config?.isHost, + id, publicConfig?.cdnBase, tenantId ]) @@ -95,6 +113,15 @@ export const LoginWithWeComQrcode = (props: any) => { const messageEvent = async (event: MessageEvent) => { if (isWeComOrigin(event)) { try { + if (events?.onBeforeLogin) { + const isContinue = await events?.onBeforeLogin( + { type: LoginMethods.WechatworkCorpQrconnect, data: event.data }, + authClient + ) + if (!isContinue) { + return + } + } // 拦截query信息 const query = new URL(event.data).search // 向应用域名下发起认证验证请求 @@ -102,6 +129,12 @@ export const LoginWithWeComQrcode = (props: any) => { `/api/v1/qrcode/${QRConfig.identifier}/verify${query}` ) if (res.code === 200) { + props.multipleInstance && + props.multipleInstance.setLoginWay( + 'qrcode', + LoginMethods.WechatworkCorpQrconnect, + props.id + ) props.onLoginSuccess(res.data) } else { const handMode = res?.onGuardHandling?.() @@ -109,35 +142,27 @@ export const LoginWithWeComQrcode = (props: any) => { handMode === CodeAction.RENDER_MESSAGE && props.onLoginFailed(res.code, res.data) } - // TODO 通过微信认证校验 获取authing认证数据 - // const { data } = await Axios(event.data, { - // headers: getHeaders(), - // }) - // if (data?.code === 200) { - // props.onLoginSuccess(data.data) - // } else { - // const res = responseIntercept(data) - // const handMode = res?.onGuardHandling?.() - // // 向上层抛出错误 - // handMode === CodeAction.RENDER_MESSAGE && - // props.onLoginFailed(res.code, data) - // } } catch (e: any) { message.error(e.message) } } } - - window.addEventListener('message', messageEvent, false) + if (!loading) { + window.addEventListener('message', messageEvent, false) + } return () => { window.removeEventListener('message', messageEvent, false) } - }) + }, [QRConfig.identifier, authClient, events, get, loading, props]) return ( -
- +
+ {loading && } +
) } diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index 2e0268ae0..cb2242463 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -81,7 +81,7 @@ import { usePostMessage } from './socialLogin/postMessage' import { LoginWithWeComQrcode } from './core/withWeComQrcode' -import { getGuardWindow } from 'src/Guard/core/useAppendConfig' +import { getGuardWindow } from '../Guard/core/useAppendConfig' const { useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback } = React @@ -251,7 +251,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ if ( qrcodeTabsSettings && (qrcodeTabsSettings?.[LoginMethods.WechatMpQrcode].length > 1 || - qrcodeTabsSettings?.[LoginMethods.WxMinQr].length > 1) + qrcodeTabsSettings?.[LoginMethods.WxMinQr].length > 1 || + qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect].length > 1) ) { return false } else { @@ -825,6 +826,12 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ | LoginMethods.WechatworkCorpQrconnect title: string id: string + QRConfig?: { + corpId: string + agentId: string + redirectUrl: string + identifier: string + } } } = {} @@ -836,7 +843,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ | LoginMethods.WxMinQr | LoginMethods.WechatworkCorpQrconnect, title: item.title, - id: item.id + id: item.id, + QRConfig: item?.QRConfig } }) }) diff --git a/packages/guard-core-v4/src/Login/styles.less b/packages/guard-core-v4/src/Login/styles.less index 0f22e152b..d9a2a4f6d 100644 --- a/packages/guard-core-v4/src/Login/styles.less +++ b/packages/guard-core-v4/src/Login/styles.less @@ -136,7 +136,7 @@ div.g2-multiple-wrapper { top: 10px; } .g2-view-message-info .authing-ant-message-notice-content { - background: #E8F2FF; + background: #e8f2ff; } // 清楚 tabs 前后竖条阴影 @@ -180,3 +180,10 @@ div.g2-multiple-wrapper { color: #153fbf; background-color: #e8f2ff; } + +.wecom_container { + display: flex; + align-items: center; + justify-content: center; + min-height: 194px; +} From bce98fcea172a6ade668faeef08844f5840bef95 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Wed, 20 Dec 2023 14:58:24 +0800 Subject: [PATCH 06/44] =?UTF-8?q?feat:=E5=86=85=E5=B5=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=A8=A1=E5=BC=8F=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/Login/index.tsx | 3 ++- packages/guard-core-v4/src/Type/application.ts | 2 ++ packages/guard-core-v4/src/_utils/hooks/index.ts | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index cb2242463..415d6b105 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -252,7 +252,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ qrcodeTabsSettings && (qrcodeTabsSettings?.[LoginMethods.WechatMpQrcode].length > 1 || qrcodeTabsSettings?.[LoginMethods.WxMinQr].length > 1 || - qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect].length > 1) + qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect]?.length > + 1) ) { return false } else { diff --git a/packages/guard-core-v4/src/Type/application.ts b/packages/guard-core-v4/src/Type/application.ts index 5196e532b..d83451c9e 100644 --- a/packages/guard-core-v4/src/Type/application.ts +++ b/packages/guard-core-v4/src/Type/application.ts @@ -313,6 +313,8 @@ export interface ApplicationConfig { | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig + /** 是否开启内嵌模式 */ + embedded?: boolean }[] ssoPageComponentDisplay: { diff --git a/packages/guard-core-v4/src/_utils/hooks/index.ts b/packages/guard-core-v4/src/_utils/hooks/index.ts index 47efe5814..e03786151 100644 --- a/packages/guard-core-v4/src/_utils/hooks/index.ts +++ b/packages/guard-core-v4/src/_utils/hooks/index.ts @@ -574,6 +574,10 @@ export const useMethod: (params: { socialConnectionObjs = [] enterpriseConnectionObjs = [] } + /** 过滤掉企业身份源中开启内嵌模式的身份源连接 如:企业微信自建 钉钉 */ + enterpriseConnectionObjs = enterpriseConnectionObjs.filter( + item => !item?.embedded + ) const isNoMethod: boolean = noLoginMethods && @@ -581,5 +585,6 @@ export const useMethod: (params: { !socialConnectionObjs.length) && (!publicConfig?.ssoPageComponentDisplay.idpBtns || !enterpriseConnectionObjs.length) + return [socialConnectionObjs, enterpriseConnectionObjs, isNoMethod] } From 4096d2379e22babeae1f9221580ab53da5303136 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Thu, 21 Dec 2023 12:45:18 +0800 Subject: [PATCH 07/44] =?UTF-8?q?feat:=E9=92=89=E9=92=89=E5=86=85=E5=B5=8C?= =?UTF-8?q?=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Guard/core/renderContext.tsx | 28 ++-- .../src/Login/core/withDingTalkQrcode.tsx | 158 ++++++++++++++++++ .../src/Login/core/withWeComQrcode.tsx | 2 +- packages/guard-core-v4/src/Login/index.tsx | 70 +++++++- packages/guard-core-v4/src/Login/styles.less | 7 +- .../guard-core-v4/src/Type/application.ts | 6 +- packages/guard-core-v4/src/Type/window.d.ts | 1 + packages/guard-core-v4/src/_utils/index.ts | 5 + 8 files changed, 252 insertions(+), 25 deletions(-) create mode 100644 packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx diff --git a/packages/guard-core-v4/src/Guard/core/renderContext.tsx b/packages/guard-core-v4/src/Guard/core/renderContext.tsx index e5e6eecd1..286c626ac 100644 --- a/packages/guard-core-v4/src/Guard/core/renderContext.tsx +++ b/packages/guard-core-v4/src/Guard/core/renderContext.tsx @@ -40,7 +40,7 @@ import { useInitAppId } from '../../_utils/initAppId' import { updateFlowHandle } from '../../_utils/flowHandleStorage' -import { ApplicationConfig } from '../../Type/application' +import { ApplicationConfig, LoginMethods } from '../../Type/application' import { AuthenticationClient } from 'authing-js-sdk' @@ -236,21 +236,21 @@ export const RenderContext: React.FC<{ } const guardDocument = getGuardDocument() // TODO: 脚本后续上传到 oss - // if ( - // publicConfig.qrcodeTabsSettings?.dingtalk && - // !scriptNodes.current?.dingtalk - // ) { - // const dingdingScriptDom = document.createElement('script') - // dingdingScriptDom.innerHTML = - // '!function(window,document){function d(a){var e,c=document.createElement("iframe"),d="https://login.dingtalk.com/login/qrcode.htm?goto="+a.goto;d+= a.style ? "&style="+encodeURIComponent(a.style):"",d+= a.href ? "&href="+a.href:"",c.src = d,c.frameBorder = "0",c.allowTransparency = "true",c.scrolling = "no",c.width = a.width ? a.width+\'px\':"365px",c.height = a.height ? a.height+\'px\':"400px",c.style.scale="0.664",e = document.getElementById(a.id),e.innerHTML = "",e.appendChild(c);return c}window.DDLogin = d}(window,document);' - // guardDocument.body.appendChild(dingdingScriptDom) - // scriptNodes.current = Object.assign(scriptNodes.current, { - // dingtalk: dingdingScriptDom - // }) - // } + if ( + publicConfig.qrcodeTabsSettings?.[LoginMethods.DingTalkQrcode] && + !scriptNodes.current?.dingtalk + ) { + const dingdingScriptDom = document.createElement('script') + dingdingScriptDom.innerHTML = + '!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1382)}({1382:function(e,t){var r=function(e,t){var r=e.match(new RegExp("[?&]"+t+"=([^&]+)"));return r?r[1]:null};window.DTFrameLogin=function(e,t,n,o){var i,u=e.id&&document.getElementById(e.id)||null,c=document.createElement("iframe");t.client_id&&t.redirect_uri&&t.response_type&&t.scope?u?(u.innerHTML="",u.appendChild(c),c&&c.contentWindow&&c.contentWindow.postMessage&&window.addEventListener?(c.src="https://"+((i=t).isPre?"pre-login":"login")+".dingtalk.com/oauth2/auth?iframe=true&redirect_uri="+i.redirect_uri+"&response_type="+i.response_type+"&client_id="+i.client_id+"&scope="+i.scope+(i.prompt?"&prompt="+i.prompt:"")+(i.state?"&state="+i.state:"")+(i.org_type?"&org_type="+i.org_type:"")+(i.corpId?"&corpId="+i.corpId:"")+(i.exclusiveLogin?"&exclusiveLogin="+i.exclusiveLogin:"")+(i.exclusiveCorpId?"&exclusiveCorpId="+i.exclusiveCorpId:""),c.width=""+(e.width||300),c.height=""+(e.height||300),c.frameBorder="0",c.scrolling="no",window.addEventListener("message",(function(e){var t=e.data,i=e.origin;if(/login.dingtalk.com/.test(i)&&t)if(t.success&&t.redirectUrl){var u=t.redirectUrl,c=r(u,"authCode")||"",d=r(u,"state")||"",s=r(u,"error")||"";c?n&&n({redirectUrl:u,authCode:c,state:d}):o&&o(s)}else o&&o(t.errorMsg)}))):o&&o("Browser not support")):o&&o("Element not found"):o&&o("Missing parameters")}}});' + guardDocument.body.appendChild(dingdingScriptDom) + scriptNodes.current = Object.assign(scriptNodes.current, { + dingtalk: dingdingScriptDom + }) + } if ( - publicConfig.qrcodeTabsSettings?.['wechatwork-corp-qrconnect'] && + publicConfig.qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect] && !scriptNodes.current?.weCom ) { const weComScriptDom = document.createElement('script') diff --git a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx new file mode 100644 index 000000000..bbee611fe --- /dev/null +++ b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx @@ -0,0 +1,158 @@ +import { message } from 'shim-antd' + +import { React } from 'shim-react' + +import qs from 'qs' + +import { CodeAction, LoginMethods } from '../..' + +import { getGuardWindow } from '../../Guard/core/useAppendConfig' + +import { ShieldSpin } from '../../ShieldSpin' + +import { isSpecialBrowser } from '../../_utils' + +import { + useGuardAppId, + useGuardEvents, + useGuardFinallyConfig, + useGuardHttpClient, + useGuardPublicConfig, + useGuardTenantId +} from '../../_utils/context' + +import { useGuardAuthClient } from '../../Guard/authClient' + +import { getVersion } from '../../_utils/getVersion' + +const version = getVersion() + +const { useCallback, useEffect, useState } = React + +export const LoginWithDingTalkQrcode = (props: any) => { + const { QRConfig, id } = props + + const DTLogin = window.DTFrameLogin + + const [loading, setLoading] = useState(false) + + const { get } = useGuardHttpClient() + + const tenantId = useGuardTenantId() + + const appId = useGuardAppId() + + const events = useGuardEvents() + + const authClient = useGuardAuthClient() + + const config = useGuardFinallyConfig() + + const publicConfig = useGuardPublicConfig() + + const fetchQrcode = useCallback(async () => { + const query: Record = { + from_guard: '1', + app_id: appId, + guard_version: `Guard@${version}`, + ...(tenantId && { tenant_id: tenantId }) + } + if (config?.isHost) { + delete query.from_guard + query.from_hosted_guard = '1' + + if (isSpecialBrowser()) { + query.redirected = '1' + const guardWindow = getGuardWindow() + if (guardWindow) { + // 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数 + query.redirect_url = qs.parse(guardWindow.location.search)?.[ + 'finish_login_url' + ] + } + } + } + + const DTFrame = DTLogin( + { + id: `dingtalk_qrcode_wrapper-${id}`, + width: '100%', + height: 388 + }, + { + redirect_uri: encodeURIComponent( + `${QRConfig.redirectUrl}?${qs.stringify(query)}` + ), + client_id: QRConfig.clientId, + scope: 'openid', + response_type: 'code', + // state: 'xxxxxxxxx', + prompt: 'consent' + }, + async (loginResult: any) => { + const { redirectUrl, authCode, state } = loginResult + // 这里可以直接进行重定向 + // window.location.href = redirectUrl + // 也可以在不跳转页面的情况下,使用code进行授权 + console.log(authCode, loginResult) + + try { + if (events?.onBeforeLogin) { + const isContinue = await events?.onBeforeLogin( + { + type: LoginMethods.WechatworkCorpQrconnect, + data: loginResult + }, + authClient + ) + if (!isContinue) { + return + } + } + // 拦截query信息 + // const query = new URL(event.data).search + // 向应用域名下发起认证验证请求 + const res = await get(`/api/v1/qrcode/${QRConfig.identifier}/verify`) + if (res.code === 200) { + props.multipleInstance && + props.multipleInstance.setLoginWay( + 'qrcode', + LoginMethods.DingTalkQrcode, + props.id + ) + props.onLoginSuccess(res.data) + } else { + const handMode = res?.onGuardHandling?.() + // 向上层抛出错误 + handMode === CodeAction.RENDER_MESSAGE && + props.onLoginFailed(res.code, res.data) + } + } catch (e: any) { + message.error(e.message) + } + }, + (errorMsg: any) => { + // 这里一般需要展示登录失败的具体原因 + console.log(errorMsg) + } + ) + // frame 页面二维码加载完毕 + DTFrame.onload = () => { + setLoading(false) + } + }, [DTLogin, QRConfig, appId, config?.isHost, tenantId]) + + useEffect(() => { + fetchQrcode() + }, [fetchQrcode]) + + return ( +
+ {loading && } +
+
+ ) +} diff --git a/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx index 96de02e0d..8b646c19f 100644 --- a/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withWeComQrcode.tsx @@ -29,7 +29,7 @@ import { getVersion } from '../../_utils/getVersion' const version = getVersion() -const { useCallback, useEffect, useState } = React +const { useCallback, useEffect, useState, useMemo } = React export const LoginWithWeComQrcode = (props: any) => { const { QRConfig, id } = props diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index 415d6b105..46677e3da 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -50,6 +50,7 @@ import { CodeAction, getPasswordIdentify, getSortTabs, + isDingTalkOrigin, isWeComOrigin } from '../_utils' @@ -68,6 +69,7 @@ import { GuardButton } from '../GuardButton' import { LoginMethods, QrCodeItem, + SocialConnectionItem, VerifyLoginMethods } from '../Type/application' @@ -83,6 +85,8 @@ import { LoginWithWeComQrcode } from './core/withWeComQrcode' import { getGuardWindow } from '../Guard/core/useAppendConfig' +import { LoginWithDingTalkQrcode } from './core/withDingTalkQrcode' + const { useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback } = React @@ -98,7 +102,8 @@ const qrcodeWays = [ LoginMethods.AppQr, LoginMethods.WxMinQr, LoginMethods.WechatMpQrcode, - LoginMethods.WechatworkCorpQrconnect + LoginMethods.WechatworkCorpQrconnect, + LoginMethods.DingTalkQrcode ] const useMethods = (config: any) => { @@ -198,6 +203,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ const qrcodeTabsSettings = publicConfig?.qrcodeTabsSettings + const socialConnections = publicConfig?.socialConnections || [] + const [errorNumber, setErrorNumber] = useState(0) const [accountLock, setAccountLock] = useState(false) @@ -252,8 +259,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ qrcodeTabsSettings && (qrcodeTabsSettings?.[LoginMethods.WechatMpQrcode].length > 1 || qrcodeTabsSettings?.[LoginMethods.WxMinQr].length > 1 || - qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect]?.length > - 1) + qrcodeTabsSettings?.[LoginMethods.DingTalkQrcode].length > 1 || + qrcodeTabsSettings?.[LoginMethods.WechatworkCorpQrconnect].length > 1) ) { return false } else { @@ -273,7 +280,8 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ [ LoginMethods.WechatMpQrcode, LoginMethods.WxMinQr, - LoginMethods.WechatworkCorpQrconnect + LoginMethods.WechatworkCorpQrconnect, + LoginMethods.DingTalkQrcode ].includes(defaultMethod) ) { const id = qrcodeTabsSettings?.[defaultMethod as LoginMethods]?.find( @@ -743,6 +751,26 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ tab={item.title ?? t('login.wecomScanLogin')} > + + ) + }, + [canLoop, multipleInstance, onLoginSuccess, t] + ) + + const DTQrTab = useCallback( + (item: QrCodeItem) => { + return ( + + = ({ [LoginMethods.AppQr]: AppQrTab, [LoginMethods.WechatMpQrcode]: WechatMpQrTab, [LoginMethods.WxMinQr]: WxMiniQrTab, - [LoginMethods.WechatworkCorpQrconnect]: WeComQrTab + [LoginMethods.WechatworkCorpQrconnect]: WeComQrTab, + [LoginMethods.DingTalkQrcode]: DTQrTab } }, [AppQrTab, WechatMpQrTab, WxMiniQrTab]) @@ -825,6 +854,7 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ | LoginMethods.WechatMpQrcode | LoginMethods.WxMinQr | LoginMethods.WechatworkCorpQrconnect + | LoginMethods.DingTalkQrcode title: string id: string QRConfig?: { @@ -832,6 +862,7 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ agentId: string redirectUrl: string identifier: string + clientId?: string } } } = {} @@ -842,10 +873,11 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ type: key as | LoginMethods.WechatMpQrcode | LoginMethods.WxMinQr - | LoginMethods.WechatworkCorpQrconnect, + | LoginMethods.WechatworkCorpQrconnect + | LoginMethods.DingTalkQrcode, title: item.title, id: item.id, - QRConfig: item?.QRConfig + QRConfig: item.QRConfig } }) }) @@ -884,7 +916,29 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ useEffect(() => { const onPostMessage = (evt: MessageEvent) => { // 去掉钉钉和企微域下的postmessage处理 由他们内部自己监听的message控制 避免重复触发 - if (isWeComOrigin(evt)) return + /** 是否存在开启内嵌模式的身份源 */ + const isEmbeddedIdp = socialConnections.filter(conn => conn.embedded) + /** 处于扫码登录方式 */ + if (isEmbeddedIdp.length > 0 && qrcodeWays.includes(loginWay)) { + if ( + isEmbeddedIdp.find( + idp => + idp.provider.replaceAll(':', '-') === + LoginMethods.WechatworkCorpQrconnect + ) && + isWeComOrigin(evt) + ) { + return + } + if ( + isEmbeddedIdp.find( + idp => idp.provider.replaceAll(':', '-') === 'dingtalk' + ) && + isDingTalkOrigin(evt.origin) + ) { + return + } + } const res = onMessage(evt) if (!res) return diff --git a/packages/guard-core-v4/src/Login/styles.less b/packages/guard-core-v4/src/Login/styles.less index d9a2a4f6d..7e1b1eaa9 100644 --- a/packages/guard-core-v4/src/Login/styles.less +++ b/packages/guard-core-v4/src/Login/styles.less @@ -185,5 +185,10 @@ div.g2-multiple-wrapper { display: flex; align-items: center; justify-content: center; - min-height: 194px; + height: 194px; + overflow: hidden; +} + +[id*='dingtalk_qrcode_wrapper-'] { + transform: scale(0.8); } diff --git a/packages/guard-core-v4/src/Type/application.ts b/packages/guard-core-v4/src/Type/application.ts index d83451c9e..08891100a 100644 --- a/packages/guard-core-v4/src/Type/application.ts +++ b/packages/guard-core-v4/src/Type/application.ts @@ -14,7 +14,8 @@ export enum LoginMethods { AD = 'ad', // 对应企业身份源的 Windows AD 登录 WechatMpQrcode = 'wechatmp-qrcode', // 微信扫码关注登录 AuthingOtpPush = 'authing-otp-push', // App 扫码登录 - WechatworkCorpQrconnect = 'wechatwork-corp-qrconnect' // 微信企业扫码关注登录 + WechatworkCorpQrconnect = 'wechatwork-corp-qrconnect', // 微信企业扫码关注登录 + DingTalkQrcode = 'dingtalk-qrcode' //钉钉扫码 } export enum OIDCConnectionMode { @@ -116,6 +117,8 @@ export interface ICasConnectionConfig { } export interface SocialConnectionItem { + id: string + embedded: boolean name: string name_en: string displayName: string @@ -148,6 +151,7 @@ export interface QrCodeItem { agentId: string redirectUrl: string identifier: string + clientId?: string } } diff --git a/packages/guard-core-v4/src/Type/window.d.ts b/packages/guard-core-v4/src/Type/window.d.ts index 73c62b9c2..8a3a6e0de 100644 --- a/packages/guard-core-v4/src/Type/window.d.ts +++ b/packages/guard-core-v4/src/Type/window.d.ts @@ -1,4 +1,5 @@ interface Window { DDLogin: any WwLogin: any + DTFrameLogin: any } diff --git a/packages/guard-core-v4/src/_utils/index.ts b/packages/guard-core-v4/src/_utils/index.ts index ed9c5c91b..188afdfa8 100644 --- a/packages/guard-core-v4/src/_utils/index.ts +++ b/packages/guard-core-v4/src/_utils/index.ts @@ -865,6 +865,11 @@ export const isWeComOrigin = (event: MessageEvent) => { return false } +// 钉钉域check https://open.dingtalk.com/document/org/scan-qr-code-to-login-3rdapp +export const isDingTalkOrigin = (origin: string) => { + return origin === 'https://login.dingtalk.com' +} + export * from './popupCenter' export * from './clipboard' From 0a715df95a0e2fe8c2071f9febe5b4e2a02e67f2 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Thu, 21 Dec 2023 04:48:03 +0000 Subject: [PATCH 08/44] v4.5.2-alpha.3 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 6 +++--- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 6 +++--- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 8 ++++---- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 6 +++--- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 6 +++--- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lerna.json b/lerna.json index f409a583c..120c352f6 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.0" + "version": "4.5.2-alpha.3" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 7c94d0abd..6be14d490 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 5400db5c8..b0b3e3153 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 46e3f0f1a..4e10f3701 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 6917952ef..eeedf108d 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 94c69ff3b..9f4085b73 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index f6e91f54a..f2cd8150d 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,8 +1,8 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Authing Guard for Native", - "main":"lib/index.min.js", + "main": "lib/index.min.js", "module": "lib/index.min.js", "types": "lib/typings/index.d.ts", "files": [ @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.0", + "@authing/guard-shim-react": "^4.5.2-alpha.3", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 83e9ade11..1a42aaebb 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index d39b7f8dc..4fd7d9a6d 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,10 +1,10 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "files": [ "dist" ], - "main":"dist/guard", + "main": "dist/guard", "module": "dist/guard", "types": "dist/guard/index.d.ts", "scripts": { @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.0", + "@authing/native-js-ui-components": "^4.5.2-alpha.3", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 4ca607091..b7372760c 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index c72aec16d..b89080a21 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,8 +1,8 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Authing Guard for React", - "main":"lib/index.min.js", + "main": "lib/index.min.js", "module": "lib/index.min.js", "types": "lib/typings/index.d.ts", "scripts": { @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.0", + "@authing/guard-shim-react": "^4.5.2-alpha.3", + "@authing/native-js-ui-components": "^4.5.2-alpha.3", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 44bc2c1c0..1f8c47f5e 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 7bedc3c60..c35aab551 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,8 +1,8 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Authing Guard for React", - "main":"lib/index.min.js", + "main": "lib/index.min.js", "module": "lib/index.min.js", "types": "lib/typings/index.d.ts", "files": [ @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.0" + "@authing/guard-shim-react18": "^4.5.2-alpha.3" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 0fe37e915..0892d97b7 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 5b45b5c6d..1d219000d 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,8 +1,8 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.0", + "version": "4.5.2-alpha.3", "description": "Authing Guard for Vue", - "main":"lib/index.min.js", + "main": "lib/index.min.js", "module": "lib/index.min.js", "types": "lib/typings/index.d.ts", "files": [ @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.0", + "@authing/native-js-ui-components": "^4.5.2-alpha.3", "vue": "^3.2.20" }, "devDependencies": { From 37523b6608a236fcd5c8017cb63813165702cb69 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Thu, 21 Dec 2023 17:16:27 +0800 Subject: [PATCH 09/44] =?UTF-8?q?feat:=E4=BC=A0=E5=85=A5=E9=92=89=E9=92=89?= =?UTF-8?q?authCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + packages/guard-core-v4/example.tsx | 4 ++-- .../src/Login/core/withDingTalkQrcode.tsx | 13 +++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 1f56f3a2b..ccd9f7cc3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules dist lib .angular + diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index 70b357c8a..87096bbe7 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -5,13 +5,13 @@ import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '63bcfede094f5e7d917d238a' + const appId = '657ac9d85a4671fc136b2216' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { // mode: GuardMode.Modal, // lang: 'en-US' - host: 'http://1.authing.localhost:3000' + host: 'https://ddddd.why.lixpng.top' } const onLogin = (userInfo: User) => { diff --git a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx index bbee611fe..23d88539b 100644 --- a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx @@ -90,11 +90,10 @@ export const LoginWithDingTalkQrcode = (props: any) => { prompt: 'consent' }, async (loginResult: any) => { - const { redirectUrl, authCode, state } = loginResult + const { authCode } = loginResult // 这里可以直接进行重定向 // window.location.href = redirectUrl // 也可以在不跳转页面的情况下,使用code进行授权 - console.log(authCode, loginResult) try { if (events?.onBeforeLogin) { @@ -112,7 +111,9 @@ export const LoginWithDingTalkQrcode = (props: any) => { // 拦截query信息 // const query = new URL(event.data).search // 向应用域名下发起认证验证请求 - const res = await get(`/api/v1/qrcode/${QRConfig.identifier}/verify`) + const res = await get( + `/api/v1/qrcode/${QRConfig.identifier}/verify?code=${authCode}` + ) if (res.code === 200) { props.multipleInstance && props.multipleInstance.setLoginWay( @@ -137,9 +138,9 @@ export const LoginWithDingTalkQrcode = (props: any) => { } ) // frame 页面二维码加载完毕 - DTFrame.onload = () => { - setLoading(false) - } + // DTFrame.onload = () => { + // setLoading(false) + // } }, [DTLogin, QRConfig, appId, config?.isHost, tenantId]) useEffect(() => { From 638f49d850818cf6c91b6c2dba13638b97b4c768 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Thu, 21 Dec 2023 09:18:47 +0000 Subject: [PATCH 10/44] v4.5.2-alpha.5 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 120c352f6..a7c0a73dd 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.3" + "version": "4.5.2-alpha.5" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 6be14d490..adb7c9b43 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index b0b3e3153..2d409227a 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 4e10f3701..e29631f94 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index eeedf108d..28bd40ebb 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 9f4085b73..263972983 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index f2cd8150d..92f6b6ce7 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.3", + "@authing/guard-shim-react": "^4.5.2-alpha.5", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 1a42aaebb..5f21e8423 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 4fd7d9a6d..6fbb105ea 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.3", + "@authing/native-js-ui-components": "^4.5.2-alpha.5", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index b7372760c..44ba7f10a 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index b89080a21..305646daa 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.3", - "@authing/native-js-ui-components": "^4.5.2-alpha.3", + "@authing/guard-shim-react": "^4.5.2-alpha.5", + "@authing/native-js-ui-components": "^4.5.2-alpha.5", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 1f8c47f5e..c87987c69 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index c35aab551..af7a2a822 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.3" + "@authing/guard-shim-react18": "^4.5.2-alpha.5" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 0892d97b7..ab1018407 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 1d219000d..e004d2e37 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.3", + "version": "4.5.2-alpha.5", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.3", + "@authing/native-js-ui-components": "^4.5.2-alpha.5", "vue": "^3.2.20" }, "devDependencies": { From f9a02e881bfa16fd3679e5faf2e9c2c265725d15 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Thu, 21 Dec 2023 17:31:17 +0800 Subject: [PATCH 11/44] =?UTF-8?q?feat:=E5=8F=82=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guard-core-v4/src/Login/core/withDingTalkQrcode.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx index 23d88539b..902da5460 100644 --- a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx @@ -17,7 +17,6 @@ import { useGuardEvents, useGuardFinallyConfig, useGuardHttpClient, - useGuardPublicConfig, useGuardTenantId } from '../../_utils/context' @@ -48,11 +47,10 @@ export const LoginWithDingTalkQrcode = (props: any) => { const config = useGuardFinallyConfig() - const publicConfig = useGuardPublicConfig() - const fetchQrcode = useCallback(async () => { const query: Record = { from_guard: '1', + embedded: '1', app_id: appId, guard_version: `Guard@${version}`, ...(tenantId && { tenant_id: tenantId }) @@ -112,7 +110,9 @@ export const LoginWithDingTalkQrcode = (props: any) => { // const query = new URL(event.data).search // 向应用域名下发起认证验证请求 const res = await get( - `/api/v1/qrcode/${QRConfig.identifier}/verify?code=${authCode}` + `/api/v1/qrcode/${QRConfig.identifier}/verify?${qs.stringify( + query + )}&code=${authCode}` ) if (res.code === 200) { props.multipleInstance && From 34b8c579b1c1bbd099409c207e61d8a9262d582f Mon Sep 17 00:00:00 2001 From: zoyafng Date: Thu, 21 Dec 2023 09:33:54 +0000 Subject: [PATCH 12/44] v4.5.2-alpha.6 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index a7c0a73dd..a91dbb7a0 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.5" + "version": "4.5.2-alpha.6" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index adb7c9b43..a941fe26b 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 2d409227a..fdae105fe 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index e29631f94..232d44de6 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 28bd40ebb..a59792837 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 263972983..6afb39e83 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 92f6b6ce7..3f3a8da13 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.5", + "@authing/guard-shim-react": "^4.5.2-alpha.6", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 5f21e8423..d26cdbf97 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 6fbb105ea..1df6eeccd 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.5", + "@authing/native-js-ui-components": "^4.5.2-alpha.6", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 44ba7f10a..a65ee90fb 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 305646daa..459f01de1 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.5", - "@authing/native-js-ui-components": "^4.5.2-alpha.5", + "@authing/guard-shim-react": "^4.5.2-alpha.6", + "@authing/native-js-ui-components": "^4.5.2-alpha.6", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index c87987c69..aea814d76 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index af7a2a822..4cdf468a5 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.5" + "@authing/guard-shim-react18": "^4.5.2-alpha.6" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index ab1018407..e891a4da9 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index e004d2e37..8c7485e5b 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.5", + "version": "4.5.2-alpha.6", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.5", + "@authing/native-js-ui-components": "^4.5.2-alpha.6", "vue": "^3.2.20" }, "devDependencies": { From 6bc9d1a545513425ba19b087af1b21cf4d1d8edd Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Thu, 21 Dec 2023 22:09:43 +0800 Subject: [PATCH 13/44] format:code --- .../src/Login/core/withDingTalkQrcode.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx index 902da5460..1e88bcb9c 100644 --- a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx @@ -8,7 +8,7 @@ import { CodeAction, LoginMethods } from '../..' import { getGuardWindow } from '../../Guard/core/useAppendConfig' -import { ShieldSpin } from '../../ShieldSpin' +// import { ShieldSpin } from '../../ShieldSpin' import { isSpecialBrowser } from '../../_utils' @@ -33,7 +33,7 @@ export const LoginWithDingTalkQrcode = (props: any) => { const DTLogin = window.DTFrameLogin - const [loading, setLoading] = useState(false) + // const [loading, setLoading] = useState(false) const { get } = useGuardHttpClient() @@ -71,7 +71,7 @@ export const LoginWithDingTalkQrcode = (props: any) => { } } - const DTFrame = DTLogin( + DTLogin( { id: `dingtalk_qrcode_wrapper-${id}`, width: '100%', @@ -149,10 +149,10 @@ export const LoginWithDingTalkQrcode = (props: any) => { return (
- {loading && } + {/* {loading && } */}
) From 7d3fcc206e3bb5c431b9ad3d80c8a5b5020fa3fb Mon Sep 17 00:00:00 2001 From: zoyafng Date: Thu, 21 Dec 2023 14:11:46 +0000 Subject: [PATCH 14/44] v4.5.2-alpha.7 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index a91dbb7a0..611bc1209 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.6" + "version": "4.5.2-alpha.7" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index a941fe26b..68f4192e7 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index fdae105fe..ee40e23c5 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 232d44de6..d6f4a98e9 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index a59792837..479ecd497 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 6afb39e83..6cd351b68 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 3f3a8da13..77b0f9ccb 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.6", + "@authing/guard-shim-react": "^4.5.2-alpha.7", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index d26cdbf97..bca900420 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 1df6eeccd..23e7b4400 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.6", + "@authing/native-js-ui-components": "^4.5.2-alpha.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index a65ee90fb..65c546fc2 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 459f01de1..1fd6421a7 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.6", - "@authing/native-js-ui-components": "^4.5.2-alpha.6", + "@authing/guard-shim-react": "^4.5.2-alpha.7", + "@authing/native-js-ui-components": "^4.5.2-alpha.7", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index aea814d76..5259f7609 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 4cdf468a5..c34398735 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.6" + "@authing/guard-shim-react18": "^4.5.2-alpha.7" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index e891a4da9..e1a102e7b 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 8c7485e5b..c38b0dcaf 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.6", + "version": "4.5.2-alpha.7", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.6", + "@authing/native-js-ui-components": "^4.5.2-alpha.7", "vue": "^3.2.20" }, "devDependencies": { From 95533acfd1939262d65083eaf0420047b1e3734c Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Fri, 22 Dec 2023 10:34:49 +0800 Subject: [PATCH 15/44] =?UTF-8?q?feat:=E9=92=89=E9=92=89=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Guard/core/renderContext.tsx | 2 +- .../src/Login/core/withDingTalkQrcode.tsx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/guard-core-v4/src/Guard/core/renderContext.tsx b/packages/guard-core-v4/src/Guard/core/renderContext.tsx index 286c626ac..0ca8d3a13 100644 --- a/packages/guard-core-v4/src/Guard/core/renderContext.tsx +++ b/packages/guard-core-v4/src/Guard/core/renderContext.tsx @@ -242,7 +242,7 @@ export const RenderContext: React.FC<{ ) { const dingdingScriptDom = document.createElement('script') dingdingScriptDom.innerHTML = - '!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1382)}({1382:function(e,t){var r=function(e,t){var r=e.match(new RegExp("[?&]"+t+"=([^&]+)"));return r?r[1]:null};window.DTFrameLogin=function(e,t,n,o){var i,u=e.id&&document.getElementById(e.id)||null,c=document.createElement("iframe");t.client_id&&t.redirect_uri&&t.response_type&&t.scope?u?(u.innerHTML="",u.appendChild(c),c&&c.contentWindow&&c.contentWindow.postMessage&&window.addEventListener?(c.src="https://"+((i=t).isPre?"pre-login":"login")+".dingtalk.com/oauth2/auth?iframe=true&redirect_uri="+i.redirect_uri+"&response_type="+i.response_type+"&client_id="+i.client_id+"&scope="+i.scope+(i.prompt?"&prompt="+i.prompt:"")+(i.state?"&state="+i.state:"")+(i.org_type?"&org_type="+i.org_type:"")+(i.corpId?"&corpId="+i.corpId:"")+(i.exclusiveLogin?"&exclusiveLogin="+i.exclusiveLogin:"")+(i.exclusiveCorpId?"&exclusiveCorpId="+i.exclusiveCorpId:""),c.width=""+(e.width||300),c.height=""+(e.height||300),c.frameBorder="0",c.scrolling="no",window.addEventListener("message",(function(e){var t=e.data,i=e.origin;if(/login.dingtalk.com/.test(i)&&t)if(t.success&&t.redirectUrl){var u=t.redirectUrl,c=r(u,"authCode")||"",d=r(u,"state")||"",s=r(u,"error")||"";c?n&&n({redirectUrl:u,authCode:c,state:d}):o&&o(s)}else o&&o(t.errorMsg)}))):o&&o("Browser not support")):o&&o("Element not found"):o&&o("Missing parameters")}}});' + '!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1382)}({1382:function(e,t){var r=function(e,t){var r=e.match(new RegExp("[?&]"+t+"=([^&]+)"));return r?r[1]:null};window.DTFrameLogin=function(e,t,n,o){var i,u=e.id&&document.getElementById(e.id)||null,c=document.createElement("iframe");t.client_id&&t.redirect_uri&&t.response_type&&t.scope?u?(u.innerHTML="",u.appendChild(c),c&&c.contentWindow&&c.contentWindow.postMessage&&window.addEventListener?(c.src="https://"+((i=t).isPre?"pre-login":"login")+".dingtalk.com/oauth2/auth?iframe=true&redirect_uri="+i.redirect_uri+"&response_type="+i.response_type+"&client_id="+i.client_id+"&scope="+i.scope+(i.prompt?"&prompt="+i.prompt:"")+(i.state?"&state="+i.state:"")+(i.org_type?"&org_type="+i.org_type:"")+(i.corpId?"&corpId="+i.corpId:"")+(i.exclusiveLogin?"&exclusiveLogin="+i.exclusiveLogin:"")+(i.exclusiveCorpId?"&exclusiveCorpId="+i.exclusiveCorpId:""),c.width=""+(e.width||300),c.height=""+(e.height||300),c.frameBorder="0",c.scrolling="no",window.addEventListener("message",(function(e){var t=e.data,i=e.origin;if(/login.dingtalk.com/.test(i)&&t)if(t.success&&t.redirectUrl){var u=t.redirectUrl,c=r(u,"authCode")||"",d=r(u,"state")||"",s=r(u,"error")||"";c?n&&n({redirectUrl:u,authCode:c,state:d}):o&&o(s)}else o&&o(t.errorMsg)}))):o&&o("Browser not support")):o&&o("Element not found"):o&&o("Missing parameters");return c;}}});' guardDocument.body.appendChild(dingdingScriptDom) scriptNodes.current = Object.assign(scriptNodes.current, { dingtalk: dingdingScriptDom diff --git a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx index 1e88bcb9c..bacafa39f 100644 --- a/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx +++ b/packages/guard-core-v4/src/Login/core/withDingTalkQrcode.tsx @@ -8,7 +8,7 @@ import { CodeAction, LoginMethods } from '../..' import { getGuardWindow } from '../../Guard/core/useAppendConfig' -// import { ShieldSpin } from '../../ShieldSpin' +import { ShieldSpin } from '../../ShieldSpin' import { isSpecialBrowser } from '../../_utils' @@ -33,7 +33,7 @@ export const LoginWithDingTalkQrcode = (props: any) => { const DTLogin = window.DTFrameLogin - // const [loading, setLoading] = useState(false) + const [loading, setLoading] = useState(true) const { get } = useGuardHttpClient() @@ -71,7 +71,7 @@ export const LoginWithDingTalkQrcode = (props: any) => { } } - DTLogin( + const DTFrame = DTLogin( { id: `dingtalk_qrcode_wrapper-${id}`, width: '100%', @@ -138,9 +138,9 @@ export const LoginWithDingTalkQrcode = (props: any) => { } ) // frame 页面二维码加载完毕 - // DTFrame.onload = () => { - // setLoading(false) - // } + DTFrame.onload = () => { + setLoading(false) + } }, [DTLogin, QRConfig, appId, config?.isHost, tenantId]) useEffect(() => { @@ -149,10 +149,10 @@ export const LoginWithDingTalkQrcode = (props: any) => { return (
- {/* {loading && } */} + {loading && }
) From f9044e380921869b4be6e763b5a493daf94cb058 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Fri, 22 Dec 2023 02:38:14 +0000 Subject: [PATCH 16/44] v4.5.2-alpha.8 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 611bc1209..6e8fc4b50 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.7" + "version": "4.5.2-alpha.8" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 68f4192e7..1c8d6f0a0 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index ee40e23c5..eb6e9d982 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index d6f4a98e9..5337e5574 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 479ecd497..781b6b227 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 6cd351b68..fbf6f1a6b 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 77b0f9ccb..d8b20073a 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.7", + "@authing/guard-shim-react": "^4.5.2-alpha.8", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index bca900420..6e911635e 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 23e7b4400..642a99aad 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.7", + "@authing/native-js-ui-components": "^4.5.2-alpha.8", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 65c546fc2..d33b976ab 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 1fd6421a7..2d3facc5a 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.7", - "@authing/native-js-ui-components": "^4.5.2-alpha.7", + "@authing/guard-shim-react": "^4.5.2-alpha.8", + "@authing/native-js-ui-components": "^4.5.2-alpha.8", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 5259f7609..1563edfa9 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index c34398735..6bc7fc208 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.7" + "@authing/guard-shim-react18": "^4.5.2-alpha.8" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index e1a102e7b..a1bda5c50 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index c38b0dcaf..13d6c5095 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.7", + "version": "4.5.2-alpha.8", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.7", + "@authing/native-js-ui-components": "^4.5.2-alpha.8", "vue": "^3.2.20" }, "devDependencies": { From f75cf19e85bf5cc37fc09ce76ae8e1d6a96f948c Mon Sep 17 00:00:00 2001 From: dongfengtao Date: Wed, 27 Dec 2023 18:34:40 +0800 Subject: [PATCH 17/44] =?UTF-8?q?fix:passkey=20=E7=99=BB=E5=BD=95=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/Login/index.tsx | 32 +++++----- .../Login/socialLogin/PasskeyButton/index.tsx | 58 +++++++++++++------ .../guard-core-v4/src/Type/application.ts | 1 + 3 files changed, 56 insertions(+), 35 deletions(-) diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index 77eb6e0a0..32577cdde 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -71,7 +71,7 @@ import { useLoginMultiple } from './hooks/useLoginMultiple' import { useGuardView } from '../Guard/core/hooks/useGuardView' import { LoginWithAuthingOtpPush } from './core/withAuthingOtpPush/index' -import { LoginWithPasskey } from './core/withPasskey' +// import { LoginWithPasskey } from './core/withPasskey' const { useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback } = React @@ -82,8 +82,7 @@ const inputWays = [ LoginMethods.AD, LoginMethods.LDAP, LoginMethods.AuthingOtpPush, - LoginMethods.EmailCode, - LoginMethods.Passkey + LoginMethods.EmailCode ] const qrcodeWays = [ LoginMethods.AppQr, @@ -737,15 +736,15 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ ) }, [ms, onLoginSuccess, t, backfillData, multipleInstance, agreements]) - const PasskeyTab = useMemo( - () => - ms?.includes(LoginMethods.Passkey) && ( - - - - ), - [ms] - ) + // const PasskeyTab = useMemo( + // () => + // ms?.includes(LoginMethods.Passkey) && ( + // + // + // + // ), + // [ms] + // ) // 登录方式对应 tab Component const tabMap = useMemo(() => { @@ -754,10 +753,9 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ [LoginMethods.PhoneCode]: CodeTab, [LoginMethods.LDAP]: LdapTab, [LoginMethods.AD]: ADTab, - [LoginMethods.AuthingOtpPush]: AuthingOtpPushTab, - [LoginMethods.Passkey]: PasskeyTab + [LoginMethods.AuthingOtpPush]: AuthingOtpPushTab } - }, [PasswordTab, CodeTab, LdapTab, ADTab, AuthingOtpPushTab, PasskeyTab]) + }, [PasswordTab, CodeTab, LdapTab, ADTab, AuthingOtpPushTab]) const GeneralLoginComponent = useMemo(() => { const total = ms?.filter(tabName => @@ -766,8 +764,7 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ LoginMethods.PhoneCode, LoginMethods.LDAP, LoginMethods.AD, - LoginMethods.AuthingOtpPush, - LoginMethods.Passkey + LoginMethods.AuthingOtpPush ].includes(tabName) ) if (total) { @@ -781,7 +778,6 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ | LoginMethods.LDAP | LoginMethods.AD | LoginMethods.AuthingOtpPush - | LoginMethods.Passkey ] ) return tabs diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx index a1021930f..aa9106946 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -1,6 +1,6 @@ import { React } from 'shim-react' import { useState } from 'react' - +import { useMediaSize } from '../../../_utils/hooks' import { message } from 'shim-antd' import axios from 'axios' import { @@ -9,14 +9,16 @@ import { get as getWebauthnCredential } from '@github/webauthn-json' import { useGuardHttp } from '../../../_utils/guardHttp' +import { useGuardPublicConfig } from '../../../_utils/context' import { GuardButton } from '../../../GuardButton' import { IconFont } from '../../../IconFont' import { useTranslation } from 'react-i18next' - +const { useCallback } = React export const PasskeyButton = () => { const [webAuthn, setWebAuthn] = useState(null) const { post, get } = useGuardHttp() - + const { isPhoneMedia } = useMediaSize() + const publicConfig = useGuardPublicConfig() const [abortController, setAbortController] = useState() const { t } = useTranslation() @@ -30,6 +32,24 @@ export const PasskeyButton = () => { return controller.signal } + const isShowPasskey = useCallback(() => { + if (isPhoneMedia || !publicConfig.passkeyEnabled) { + return false + } + const userAgent = navigator.userAgent + if (userAgent.includes('Chrome') && !userAgent.includes('Edge')) { + return 'Chrome' + } else if (userAgent.includes('Safari') && !userAgent.includes('Chrome')) { + return 'Safari' + } else if (userAgent.includes('Edg')) { + return 'Edge' + } else if (userAgent.includes('Brave')) { + return 'Brave' + } else { + return false // 未知浏览器 + } + }, [isPhoneMedia, publicConfig]) + const initializeLogin = async () => { const { data } = await post('/api/v3/webauthn/login/initialize', {}) return data @@ -55,19 +75,23 @@ export const PasskeyButton = () => { } return ( - - } - > - {t('login.loginWithPasskey')} - + <> + {isShowPasskey() && ( + + } + > + {t('login.loginWithPasskey')} + + )} + ) } diff --git a/packages/guard-core-v4/src/Type/application.ts b/packages/guard-core-v4/src/Type/application.ts index 8df636f62..6f1a2c6da 100644 --- a/packages/guard-core-v4/src/Type/application.ts +++ b/packages/guard-core-v4/src/Type/application.ts @@ -394,4 +394,5 @@ export interface ApplicationConfig { appRobotVerify: 'always_enable' | 'disable' | 'condition_set' /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */ userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set' + passkeyEnabled: boolean } From 5e8d22593ac09e23092fe75308899313bad44205 Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Wed, 27 Dec 2023 10:45:34 +0000 Subject: [PATCH 18/44] v4.5.3-alpha.4 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 40cd27812..55c023f24 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.2-alpha.4" + "version": "4.5.3-alpha.4" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 9bec707e2..8a3ec160e 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 82d83bfe7..6f40143c6 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index bc2adec4a..cf0cf381c 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 3bacd3867..ab21b2ce5 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 28ad83498..e9680abe2 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 2ae83bc0b..12afedc77 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.4", + "@authing/guard-shim-react": "^4.5.3-alpha.4", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index f02004ffe..2b89d5629 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index fc5173a87..61797f5ad 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.2-alpha.4", + "@authing/native-js-ui-components": "^4.5.3-alpha.4", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index bf8e85da1..827701e1a 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 96bb8c753..cc9bf5cb0 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.2-alpha.4", - "@authing/native-js-ui-components": "^4.5.2-alpha.4", + "@authing/guard-shim-react": "^4.5.3-alpha.4", + "@authing/native-js-ui-components": "^4.5.3-alpha.4", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 84dbe7e39..5d89df9d2 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 086e6556d..a93941377 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.2-alpha.4" + "@authing/guard-shim-react18": "^4.5.3-alpha.4" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index ff107d9d7..82460986d 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 22a58f4ce..20891bcdc 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.2-alpha.4", + "version": "4.5.3-alpha.4", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.2-alpha.4", + "@authing/native-js-ui-components": "^4.5.3-alpha.4", "vue": "^3.2.20" }, "devDependencies": { From 77dfec9b0c7185571f484e181e4f5b3f7aca823c Mon Sep 17 00:00:00 2001 From: cj Date: Thu, 28 Dec 2023 13:14:27 +0700 Subject: [PATCH 19/44] =?UTF-8?q?feat:=20passkey=20=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E4=B9=8B=E5=90=8E=E8=A7=A6=E5=8F=91=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/example.tsx | 4 +- .../src/Login/core/withPasskey/index.tsx | 59 -------- .../Login/socialLogin/PasskeyButton/index.tsx | 126 +++++++++++++----- .../src/Login/socialLogin/index.tsx | 5 +- 4 files changed, 101 insertions(+), 93 deletions(-) delete mode 100644 packages/guard-core-v4/src/Login/core/withPasskey/index.tsx diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index 0cbd84433..b157e2c40 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -1,11 +1,11 @@ -import { Guard, User, GuardMode, GuardLocalConfig } from './src/index' +import { Guard, User, GuardLocalConfig } from './src/index' import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '655c7e25f42de46d31de26fd' + const appId = '658b08e8d5089b160caace66' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { diff --git a/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx b/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx deleted file mode 100644 index 587f6e609..000000000 --- a/packages/guard-core-v4/src/Login/core/withPasskey/index.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { React } from 'shim-react' -import { useState } from 'react' - -import { message } from 'shim-antd' -import axios from 'axios' -import { - CredentialRequestOptionsJSON, - create as createWebauthnCredential, - get as getWebauthnCredential -} from '@github/webauthn-json' -import { useGuardHttp } from '../../../_utils/guardHttp' - -interface LoginWithPasskeyProps {} - -export const LoginWithPasskey = (props: LoginWithPasskeyProps) => { - const [webAuthn, setWebAuthn] = useState(null) - const { post, get } = useGuardHttp() - - const [abortController, setAbortController] = useState() - - const createAbortSignal = () => { - if (abortController) { - abortController.abort() - } - const controller = new AbortController() - setAbortController(controller) - return controller.signal - } - - const initializeLogin = async () => { - const { data } = await post('/api/v3/webauthn/login/initialize', {}) - return data - } - - const finalizeLogin = async (assertion: any, ticket: string) => { - const { data } = await post('/api/v3/webauthn/login/finalize', { - credential: assertion, - ticket - }) - return data - } - - const handleLogin = async () => { - const challenge = await initializeLogin() - challenge.mediation = 'required' as CredentialMediationRequirement - challenge.signal = createAbortSignal() - const ticket = challenge.ticket - const assertion = await getWebauthnCredential(challenge) - console.log(assertion) - const assertionResponse = await finalizeLogin(assertion, ticket) - alert(JSON.stringify(assertionResponse)) - } - - return ( -
- -
- ) -} diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx index aa9106946..e5c75942f 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -1,25 +1,37 @@ import { React } from 'shim-react' import { useState } from 'react' import { useMediaSize } from '../../../_utils/hooks' -import { message } from 'shim-antd' -import axios from 'axios' -import { - CredentialRequestOptionsJSON, - create as createWebauthnCredential, - get as getWebauthnCredential -} from '@github/webauthn-json' +import { get as getWebauthnCredential } from '@github/webauthn-json' import { useGuardHttp } from '../../../_utils/guardHttp' -import { useGuardPublicConfig } from '../../../_utils/context' +import { + useGuardAppId, + useGuardFinallyConfig, + useGuardHttpClient, + useGuardPublicConfig +} from '../../../_utils/context' import { GuardButton } from '../../../GuardButton' import { IconFont } from '../../../IconFont' import { useTranslation } from 'react-i18next' +import { requestClient } from '../../../_utils/http' +import { CodeAction, getVersion, i18n } from '../../../_utils' + +interface LoginWithPasskeyProps { + onLoginSuccess: any + onLoginFailed: any +} + const { useCallback } = React -export const PasskeyButton = () => { - const [webAuthn, setWebAuthn] = useState(null) - const { post, get } = useGuardHttp() + +export const PasskeyButton = (props: LoginWithPasskeyProps) => { + const { onLoginFailed, onLoginSuccess } = props const { isPhoneMedia } = useMediaSize() const publicConfig = useGuardPublicConfig() const [abortController, setAbortController] = useState() + const [loading, setLoading] = useState(false) + const { host } = useGuardFinallyConfig() + const appId = useGuardAppId() + const version = getVersion() + const { responseIntercept } = useGuardHttpClient() const { t } = useTranslation() @@ -50,28 +62,79 @@ export const PasskeyButton = () => { } }, [isPhoneMedia, publicConfig]) - const initializeLogin = async () => { - const { data } = await post('/api/v3/webauthn/login/initialize', {}) - return data - } + const handleLogin = async () => { + setLoading(true) + try { + const initializeApi = `${host}/api/v3/webauthn/login/initialize` - const finalizeLogin = async (assertion: any, ticket: string) => { - const { data } = await post('/api/v3/webauthn/login/finalize', { - credential: assertion, - ticket - }) - return data - } + const initializeRes = await fetch(initializeApi, { + method: 'POST', + body: JSON.stringify({}), + credentials: 'include', + headers: { + 'Content-Type': 'application/json', + [requestClient.langHeader]: i18n.language, + 'x-authing-userpool-id': publicConfig.userPoolId, + 'x-authing-app-id': appId, + 'x-authing-sdk-version': version, + 'x-authing-request-from': `Guard@${version}` + } + }) + const initializeJson = await initializeRes.json() + const { + statusCode, + data: challenge, + onGuardHandling, + message: tips + } = responseIntercept(initializeJson) + if (statusCode !== 200) { + const handMode = onGuardHandling?.() + // 向上层抛出错误 + handMode === CodeAction.RENDER_MESSAGE && + onLoginFailed(statusCode, challenge, tips) + return + } - const handleLogin = async () => { - const challenge = await initializeLogin() - challenge.mediation = 'required' as CredentialMediationRequirement - challenge.signal = createAbortSignal() - const ticket = challenge.ticket - const assertion = await getWebauthnCredential(challenge) - console.log(assertion) - const assertionResponse = await finalizeLogin(assertion, ticket) - alert(JSON.stringify(assertionResponse)) + challenge.mediation = 'required' as CredentialMediationRequirement + challenge.signal = createAbortSignal() + const ticket = challenge.ticket + const assertion = await getWebauthnCredential(challenge) + + const finalizeApi = `${host}/api/v3/webauthn/login/finalize` + const finalizeRes = await fetch(finalizeApi, { + method: 'POST', + body: JSON.stringify({ + credential: assertion, + ticket + }), + credentials: 'include', + headers: { + 'Content-Type': 'application/json', + [requestClient.langHeader]: i18n.language, + 'x-authing-userpool-id': publicConfig.userPoolId, + 'x-authing-app-id': appId, + 'x-authing-sdk-version': version, + 'x-authing-request-from': `Guard@${version}` + } + }) + const finalizeJson = await finalizeRes.json() + const { + statusCode: code2, + data: tokenSet, + message: tips2 + } = responseIntercept(finalizeJson) + if (code2 !== 200) { + const handMode = onGuardHandling?.() + // 向上层抛出错误 + handMode === CodeAction.RENDER_MESSAGE && + onLoginFailed(code2, tokenSet, tips2) + return + } + onLoginSuccess(tokenSet) + } catch (error) { + } finally { + setLoading(false) + } } return ( @@ -80,6 +143,7 @@ export const PasskeyButton = () => { = ({ marginTop: -8 }} > - +
) From 7de94acade7bb1d8827ffce26cae371f8034a183 Mon Sep 17 00:00:00 2001 From: dongfengtao Date: Thu, 28 Dec 2023 14:34:24 +0800 Subject: [PATCH 20/44] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0=20react-ui-compone?= =?UTF-8?q?nts=20passkey=20=20=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=20windo?= =?UTF-8?q?ws=20=E7=94=B5=E8=84=91=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Login/socialLogin/PasskeyButton/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx index e5c75942f..1817d2d9b 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -48,7 +48,9 @@ export const PasskeyButton = (props: LoginWithPasskeyProps) => { if (isPhoneMedia || !publicConfig.passkeyEnabled) { return false } + const userAgent = navigator.userAgent + if (userAgent.includes('Chrome') && !userAgent.includes('Edge')) { return 'Chrome' } else if (userAgent.includes('Safari') && !userAgent.includes('Chrome')) { @@ -57,6 +59,8 @@ export const PasskeyButton = (props: LoginWithPasskeyProps) => { return 'Edge' } else if (userAgent.includes('Brave')) { return 'Brave' + } else if (userAgent.includes('Windows')) { + return false } else { return false // 未知浏览器 } From e23ec3ef4c61804f7828047aac6dccfff7834fd1 Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 06:37:52 +0000 Subject: [PATCH 21/44] v4.5.3-alpha.5 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 55c023f24..4446d07d4 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.3-alpha.4" + "version": "4.5.3-alpha.5" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 8a3ec160e..f7df4d100 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 6f40143c6..ef0fdf04e 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index cf0cf381c..b9ff9a5e7 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index ab21b2ce5..c128690d2 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index e9680abe2..eb4884aa5 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 12afedc77..32e80e851 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3-alpha.4", + "@authing/guard-shim-react": "^4.5.3-alpha.5", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 2b89d5629..51dd4f662 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 61797f5ad..8f4835ccd 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.3-alpha.4", + "@authing/native-js-ui-components": "^4.5.3-alpha.5", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 827701e1a..c5f49f10c 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index cc9bf5cb0..74f66483e 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3-alpha.4", - "@authing/native-js-ui-components": "^4.5.3-alpha.4", + "@authing/guard-shim-react": "^4.5.3-alpha.5", + "@authing/native-js-ui-components": "^4.5.3-alpha.5", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 5d89df9d2..11a359060 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index a93941377..21edf1dd6 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.3-alpha.4" + "@authing/guard-shim-react18": "^4.5.3-alpha.5" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 82460986d..ad4ea339e 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 20891bcdc..da67e3f72 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3-alpha.4", + "version": "4.5.3-alpha.5", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.3-alpha.4", + "@authing/native-js-ui-components": "^4.5.3-alpha.5", "vue": "^3.2.20" }, "devDependencies": { From 54133214e4fd32918e15f64c514308a81aa8e7c0 Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 06:49:48 +0000 Subject: [PATCH 22/44] v4.5.3-alpha.6 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 05da9061c..263346a48 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.3" + "version": "4.5.3-alpha.6" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 3a08141a5..b533516ee 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index dcfc71c37..4aca62a15 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index f5c5f9351..fd5b4c017 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 720849974..e1d16cadd 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 28d64456f..e6f0a37e6 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 40a2e6f3f..dcf34e70b 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3", + "@authing/guard-shim-react": "^4.5.3-alpha.6", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 86a269eb1..94623ef94 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index c76947038..9d4febf4e 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.3", + "@authing/native-js-ui-components": "^4.5.3-alpha.6", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 0d60b79b1..2d2bfff49 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index a54e5a9f1..bda965042 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3", - "@authing/native-js-ui-components": "^4.5.3", + "@authing/guard-shim-react": "^4.5.3-alpha.6", + "@authing/native-js-ui-components": "^4.5.3-alpha.6", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index fceb5fb0b..24997266e 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 8421cd757..ae669be36 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.3" + "@authing/guard-shim-react18": "^4.5.3-alpha.6" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 49b531727..bfaa18230 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 066203ffe..603126c93 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3", + "version": "4.5.3-alpha.6", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.3", + "@authing/native-js-ui-components": "^4.5.3-alpha.6", "vue": "^3.2.20" }, "devDependencies": { From dd0064b110324975efdf28d816f69f029317a921 Mon Sep 17 00:00:00 2001 From: cj Date: Thu, 28 Dec 2023 14:16:04 +0700 Subject: [PATCH 23/44] update --- .../src/Login/socialLogin/PasskeyButton/index.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx index 1817d2d9b..aad047aff 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -88,14 +88,10 @@ export const PasskeyButton = (props: LoginWithPasskeyProps) => { const { statusCode, data: challenge, - onGuardHandling, message: tips } = responseIntercept(initializeJson) if (statusCode !== 200) { - const handMode = onGuardHandling?.() - // 向上层抛出错误 - handMode === CodeAction.RENDER_MESSAGE && - onLoginFailed(statusCode, challenge, tips) + onLoginFailed(statusCode, undefined, tips) return } @@ -128,10 +124,7 @@ export const PasskeyButton = (props: LoginWithPasskeyProps) => { message: tips2 } = responseIntercept(finalizeJson) if (code2 !== 200) { - const handMode = onGuardHandling?.() - // 向上层抛出错误 - handMode === CodeAction.RENDER_MESSAGE && - onLoginFailed(code2, tokenSet, tips2) + onLoginFailed(code2, undefined, tips2) return } onLoginSuccess(tokenSet) From d358487548b3743faf0a27ff9ccb30c95e96d9d0 Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 07:26:09 +0000 Subject: [PATCH 24/44] v4.5.4-alpha.1 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 263346a48..9d50517a9 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.3-alpha.6" + "version": "4.5.4-alpha.1" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index b533516ee..b884038d4 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 4aca62a15..dd86a486d 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index fd5b4c017..1bdf71549 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index e1d16cadd..55481c4c1 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index e6f0a37e6..0f8512261 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index dcf34e70b..9cac7bc4b 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3-alpha.6", + "@authing/guard-shim-react": "^4.5.4-alpha.1", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 94623ef94..becc2a8ec 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 9d4febf4e..64bbfad47 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.3-alpha.6", + "@authing/native-js-ui-components": "^4.5.4-alpha.1", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 2d2bfff49..a68188371 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index bda965042..a34ceef07 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3-alpha.6", - "@authing/native-js-ui-components": "^4.5.3-alpha.6", + "@authing/guard-shim-react": "^4.5.4-alpha.1", + "@authing/native-js-ui-components": "^4.5.4-alpha.1", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 24997266e..5d6b4195c 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index ae669be36..9d3c56e75 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.3-alpha.6" + "@authing/guard-shim-react18": "^4.5.4-alpha.1" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index bfaa18230..9d468d4b6 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 603126c93..6c3dcbbf8 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.3-alpha.6", + "version": "4.5.4-alpha.1", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.3-alpha.6", + "@authing/native-js-ui-components": "^4.5.4-alpha.1", "vue": "^3.2.20" }, "devDependencies": { From 728ba4651cd340cc22dacc4648f6601ac0725ca8 Mon Sep 17 00:00:00 2001 From: dongfengtao Date: Thu, 28 Dec 2023 16:43:24 +0800 Subject: [PATCH 25/44] =?UTF-8?q?fix:=E5=90=88=E5=B9=B6guard-shim-react=20?= =?UTF-8?q?=E5=92=8C=20native-js-ui-components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-shim-react/package.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 1bdf71549..f5c5f9351 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.4-alpha.1", + "version": "4.5.3", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 9cac7bc4b..40a2e6f3f 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.3", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.4-alpha.1", + "@authing/guard-shim-react": "^4.5.3", "react": "^16.13.1", "react-dom": "^16.13.1" }, From 6e2774bf1103bfd3d9470862580b91fd8643ccde Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 08:45:57 +0000 Subject: [PATCH 26/44] v4.5.4-alpha.3 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 2 +- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 2 +- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lerna.json b/lerna.json index 9d50517a9..ad24d1bd4 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.4-alpha.1" + "version": "4.5.4-alpha.3" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index b884038d4..1a77b9289 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index dd86a486d..fc5797257 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index f5c5f9351..f4c07be0c 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.3", + "version": "4.5.4-alpha.3", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 55481c4c1..c0913b139 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 0f8512261..0732b4a7d 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 40a2e6f3f..854b57af8 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.3", + "version": "4.5.4-alpha.3", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.3", + "@authing/guard-shim-react": "^4.5.4-alpha.3", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index becc2a8ec..bde3167de 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 64bbfad47..292bf7184 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "files": [ "dist" ], diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index a68188371..12eae2bfb 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index a34ceef07..cd72bfd7a 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 5d6b4195c..0117706a4 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 9d3c56e75..b69a1ec9e 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.4-alpha.1" + "@authing/guard-shim-react18": "^4.5.4-alpha.3" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 9d468d4b6..914ad328c 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 6c3dcbbf8..abcbc8092 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4-alpha.1", + "version": "4.5.4-alpha.3", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", From 2934dec741c636f28078e032d1f4092b47fc9297 Mon Sep 17 00:00:00 2001 From: dongfengtao Date: Thu, 28 Dec 2023 18:15:24 +0800 Subject: [PATCH 27/44] =?UTF-8?q?fix:=20=E4=B8=8A=E7=BA=BF=20passkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index fc5797257..0547ba555 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ From 410d5c59a73de3087c5c4cefad726b92a2ff634b Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 10:17:44 +0000 Subject: [PATCH 28/44] v4.5.4 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lerna.json b/lerna.json index ad24d1bd4..4f0543c26 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.4-alpha.3" + "version": "4.5.4" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 1a77b9289..3a1cc6e9f 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index f4c07be0c..62c10fe6e 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index c0913b139..ec4fd6f6a 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 0732b4a7d..f41e3b4b2 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 854b57af8..7854e71b0 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.4-alpha.3", + "@authing/guard-shim-react": "^4.5.4", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index bde3167de..36cafe402 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 292bf7184..0bdc8571d 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.4-alpha.1", + "@authing/native-js-ui-components": "^4.5.4", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 12eae2bfb..de94b005b 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index cd72bfd7a..07dafb589 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.4-alpha.1", - "@authing/native-js-ui-components": "^4.5.4-alpha.1", + "@authing/guard-shim-react": "^4.5.4", + "@authing/native-js-ui-components": "^4.5.4", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 0117706a4..7b3f7769d 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index b69a1ec9e..67e4d6e3e 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.4-alpha.3" + "@authing/guard-shim-react18": "^4.5.4" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 914ad328c..0dbda748a 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index abcbc8092..ceeda500a 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4-alpha.3", + "version": "4.5.4", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.4-alpha.1", + "@authing/native-js-ui-components": "^4.5.4", "vue": "^3.2.20" }, "devDependencies": { From 7d6ee97f0efe232112f03881addd59545b1f9c34 Mon Sep 17 00:00:00 2001 From: cj Date: Thu, 28 Dec 2023 18:07:37 +0700 Subject: [PATCH 29/44] fix --- .../src/Login/socialLogin/PasskeyButton/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx index aad047aff..e902b0624 100644 --- a/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx +++ b/packages/guard-core-v4/src/Login/socialLogin/PasskeyButton/index.tsx @@ -128,7 +128,8 @@ export const PasskeyButton = (props: LoginWithPasskeyProps) => { return } onLoginSuccess(tokenSet) - } catch (error) { + } catch (error: any) { + onLoginFailed(500, undefined, error.message) } finally { setLoading(false) } From 720fdc3f9cd75c32436585e0a97c7236d9d0546b Mon Sep 17 00:00:00 2001 From: dongfengtao Date: Thu, 28 Dec 2023 20:20:24 +0800 Subject: [PATCH 30/44] =?UTF-8?q?fix:passkey=20=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 0547ba555..fe26e1825 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4", + "version": "4.5.5", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ From e99be694c8212f90850f474a0979c50f48bffe3c Mon Sep 17 00:00:00 2001 From: dongfengtaoadmin Date: Thu, 28 Dec 2023 12:22:47 +0000 Subject: [PATCH 31/44] v4.5.5 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lerna.json b/lerna.json index 4f0543c26..57789382f 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.4" + "version": "4.5.5" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 3a1cc6e9f..0debaad21 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 62c10fe6e..d278937ff 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.4", + "version": "4.5.5", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index ec4fd6f6a..cabae4692 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.4", + "version": "4.5.5", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index f41e3b4b2..7771f4a32 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 7854e71b0..109e1a8c0 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.4", + "version": "4.5.5", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.4", + "@authing/guard-shim-react": "^4.5.5", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 36cafe402..de4377fba 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 0bdc8571d..ce796df67 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.4", + "version": "4.5.5", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.4", + "@authing/native-js-ui-components": "^4.5.5", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index de94b005b..59431fa44 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 07dafb589..2d4d32cd8 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.4", + "version": "4.5.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.4", - "@authing/native-js-ui-components": "^4.5.4", + "@authing/guard-shim-react": "^4.5.5", + "@authing/native-js-ui-components": "^4.5.5", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 7b3f7769d..d4abe78d7 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 67e4d6e3e..4f6ed7be4 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.4", + "version": "4.5.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.4" + "@authing/guard-shim-react18": "^4.5.5" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 0dbda748a..d4efa2edb 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4", + "version": "4.5.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index ceeda500a..51d6e61f9 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.4", + "version": "4.5.5", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.4", + "@authing/native-js-ui-components": "^4.5.5", "vue": "^3.2.20" }, "devDependencies": { From 81dc45bd6a388cdfee9343cfa6833b138ffcc0bb Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Fri, 29 Dec 2023 17:02:35 +0800 Subject: [PATCH 32/44] =?UTF-8?q?feat:=E8=AF=AD=E8=A8=80=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E5=88=B0=20cookie=20=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/_utils/locales/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/guard-core-v4/src/_utils/locales/index.ts b/packages/guard-core-v4/src/_utils/locales/index.ts index aa0f20b8a..b0c7404a6 100644 --- a/packages/guard-core-v4/src/_utils/locales/index.ts +++ b/packages/guard-core-v4/src/_utils/locales/index.ts @@ -16,6 +16,8 @@ import * as jaJpTrans from './ja-jp' import { Lang } from '../../Type' +import { getGuardDocument } from '../guardDocument' + const LanguageResources: Resource = { 'en-US': { translation: enUsTrans }, 'zh-CN': { translation: zhCnTrans }, @@ -100,8 +102,9 @@ export const initGuardI18n = async ( lng, detection: { order: detectionOrder, - // todo 后续改为可配置项 - lookupCookie: '_authing_lang', // 与公有云 portal 语言保持一致 + lookupCookie: '_authing_lang_app', + cookieDomain: getGuardDocument().domain, + cookieOptions: { path: '/' }, lookupLocalStorage: '_guard_i18nextLng' //与console主要业务i18n相关的key脱离 }, resources: LanguageResources, From 7e4e80dfb55f25dccab4c9ac72bc6ec706244121 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Fri, 29 Dec 2023 09:23:19 +0000 Subject: [PATCH 33/44] v4.5.6-alpha.0 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 57789382f..f250f1fee 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.5" + "version": "4.5.6-alpha.0" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 0debaad21..ea687e7d9 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index fe26e1825..17840e330 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index d278937ff..cde4c4160 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index cabae4692..757e9ca0d 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 7771f4a32..2a329503b 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 109e1a8c0..e0d29af63 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.5", + "@authing/guard-shim-react": "^4.5.6-alpha.0", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index de4377fba..cc2228e42 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index ce796df67..de3173e23 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.5", + "@authing/native-js-ui-components": "^4.5.6-alpha.0", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 59431fa44..389677982 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 2d4d32cd8..d28df4bde 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.5", - "@authing/native-js-ui-components": "^4.5.5", + "@authing/guard-shim-react": "^4.5.6-alpha.0", + "@authing/native-js-ui-components": "^4.5.6-alpha.0", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index d4abe78d7..3a4511bd0 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 4f6ed7be4..9a9a0cd71 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.5" + "@authing/guard-shim-react18": "^4.5.6-alpha.0" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index d4efa2edb..e9f37b5c3 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 51d6e61f9..9ec17144e 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.0", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.5", + "@authing/native-js-ui-components": "^4.5.6-alpha.0", "vue": "^3.2.20" }, "devDependencies": { From 2bab4c869b18df7528ca286143ff28484c2775a4 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Fri, 29 Dec 2023 18:28:36 +0800 Subject: [PATCH 34/44] feat:cache cookie --- packages/guard-core-v4/src/_utils/locales/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/guard-core-v4/src/_utils/locales/index.ts b/packages/guard-core-v4/src/_utils/locales/index.ts index b0c7404a6..988fcb924 100644 --- a/packages/guard-core-v4/src/_utils/locales/index.ts +++ b/packages/guard-core-v4/src/_utils/locales/index.ts @@ -16,8 +16,6 @@ import * as jaJpTrans from './ja-jp' import { Lang } from '../../Type' -import { getGuardDocument } from '../guardDocument' - const LanguageResources: Resource = { 'en-US': { translation: enUsTrans }, 'zh-CN': { translation: zhCnTrans }, @@ -103,7 +101,7 @@ export const initGuardI18n = async ( detection: { order: detectionOrder, lookupCookie: '_authing_lang_app', - cookieDomain: getGuardDocument().domain, + caches: ['localStorage', 'cookie'], cookieOptions: { path: '/' }, lookupLocalStorage: '_guard_i18nextLng' //与console主要业务i18n相关的key脱离 }, From 23c7181ec77333a7ed6e01e9cbbaf09ac6983058 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Fri, 29 Dec 2023 10:33:28 +0000 Subject: [PATCH 35/44] v4.5.6-alpha.2 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index f250f1fee..6fa98b91e 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.6-alpha.0" + "version": "4.5.6-alpha.2" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index ea687e7d9..783570d1a 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 17840e330..017189208 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index cde4c4160..b3ea2930a 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 757e9ca0d..8e1f5cdd6 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 2a329503b..50963d471 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index e0d29af63..c15537873 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.0", + "@authing/guard-shim-react": "^4.5.6-alpha.2", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index cc2228e42..c3214f867 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index de3173e23..650d9aee9 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.6-alpha.0", + "@authing/native-js-ui-components": "^4.5.6-alpha.2", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 389677982..d4971599e 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index d28df4bde..64e147364 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.0", - "@authing/native-js-ui-components": "^4.5.6-alpha.0", + "@authing/guard-shim-react": "^4.5.6-alpha.2", + "@authing/native-js-ui-components": "^4.5.6-alpha.2", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 3a4511bd0..66a7919b8 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 9a9a0cd71..dbec52896 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.6-alpha.0" + "@authing/guard-shim-react18": "^4.5.6-alpha.2" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index e9f37b5c3..5c42532b9 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 9ec17144e..f8eb6ba2a 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.0", + "version": "4.5.6-alpha.2", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.6-alpha.0", + "@authing/native-js-ui-components": "^4.5.6-alpha.2", "vue": "^3.2.20" }, "devDependencies": { From 00f1a1d4e16225ff60ca321d413d64838247fefc Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Fri, 29 Dec 2023 19:01:48 +0800 Subject: [PATCH 36/44] =?UTF-8?q?feat:=E8=B0=83=E6=95=B4cookie=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/_utils/locales/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/guard-core-v4/src/_utils/locales/index.ts b/packages/guard-core-v4/src/_utils/locales/index.ts index 988fcb924..1358663ee 100644 --- a/packages/guard-core-v4/src/_utils/locales/index.ts +++ b/packages/guard-core-v4/src/_utils/locales/index.ts @@ -100,7 +100,7 @@ export const initGuardI18n = async ( lng, detection: { order: detectionOrder, - lookupCookie: '_authing_lang_app', + lookupCookie: '_authing_app_lang', caches: ['localStorage', 'cookie'], cookieOptions: { path: '/' }, lookupLocalStorage: '_guard_i18nextLng' //与console主要业务i18n相关的key脱离 From ede7407142fd57218756d0be00528900bb61215b Mon Sep 17 00:00:00 2001 From: zoyafng Date: Fri, 29 Dec 2023 11:06:28 +0000 Subject: [PATCH 37/44] v4.5.6-alpha.3 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 6fa98b91e..53f1939e3 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.6-alpha.2" + "version": "4.5.6-alpha.3" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 783570d1a..38f2bc505 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 017189208..89806fa97 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index b3ea2930a..93509d116 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 8e1f5cdd6..93093c93f 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 50963d471..2243e8aa8 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index c15537873..48276feff 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.2", + "@authing/guard-shim-react": "^4.5.6-alpha.3", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index c3214f867..97bffbea1 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 650d9aee9..85022ff85 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.6-alpha.2", + "@authing/native-js-ui-components": "^4.5.6-alpha.3", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index d4971599e..0e068812f 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 64e147364..2b0368c87 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.2", - "@authing/native-js-ui-components": "^4.5.6-alpha.2", + "@authing/guard-shim-react": "^4.5.6-alpha.3", + "@authing/native-js-ui-components": "^4.5.6-alpha.3", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 66a7919b8..dd8316a58 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index dbec52896..c295b96d9 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.6-alpha.2" + "@authing/guard-shim-react18": "^4.5.6-alpha.3" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 5c42532b9..b38d3407f 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index f8eb6ba2a..46ccf12c9 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.2", + "version": "4.5.6-alpha.3", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.6-alpha.2", + "@authing/native-js-ui-components": "^4.5.6-alpha.3", "vue": "^3.2.20" }, "devDependencies": { From 6ad5e8b10fc8d93aa9f2b368389bb31bafc11d99 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Wed, 3 Jan 2024 14:12:26 +0800 Subject: [PATCH 38/44] =?UTF-8?q?feat:=E8=B0=83=E6=95=B4=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/example.tsx | 4 ++-- packages/guard-core-v4/src/_utils/locales/index.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index b157e2c40..e34c21dc1 100644 --- a/packages/guard-core-v4/example.tsx +++ b/packages/guard-core-v4/example.tsx @@ -5,13 +5,13 @@ import { React, render } from 'shim-react' import * as facePlugin from 'face-api.js' const App = () => { - const appId = '658b08e8d5089b160caace66' + const appId = '658e7ba8596b462d99912872' // const deviceId = '6486be0f60e50cb92678a468' //如要使用必须使用开启元数据对的 用户池 测试 const config: Partial = { // mode: GuardMode.Modal, // lang: 'en-US', - host: 'https://passkey.cj.local' + host: 'http://1229.authing.localhost:3000' } const onLogin = (userInfo: User) => { diff --git a/packages/guard-core-v4/src/_utils/locales/index.ts b/packages/guard-core-v4/src/_utils/locales/index.ts index 1358663ee..ed37ad7aa 100644 --- a/packages/guard-core-v4/src/_utils/locales/index.ts +++ b/packages/guard-core-v4/src/_utils/locales/index.ts @@ -16,6 +16,8 @@ import * as jaJpTrans from './ja-jp' import { Lang } from '../../Type' +import { getGuardDocument } from '../guardDocument' + const LanguageResources: Resource = { 'en-US': { translation: enUsTrans }, 'zh-CN': { translation: zhCnTrans }, @@ -102,6 +104,7 @@ export const initGuardI18n = async ( order: detectionOrder, lookupCookie: '_authing_app_lang', caches: ['localStorage', 'cookie'], + cookieDomain: `.${getGuardDocument().domain}`, cookieOptions: { path: '/' }, lookupLocalStorage: '_guard_i18nextLng' //与console主要业务i18n相关的key脱离 }, From 040020e9eb84ed1b759710d4c97cc3bea64dab07 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Wed, 3 Jan 2024 06:27:04 +0000 Subject: [PATCH 39/44] v4.5.6-alpha.5 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 53f1939e3..d1929118d 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.6-alpha.3" + "version": "4.5.6-alpha.5" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 38f2bc505..2b4d9f3fb 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 89806fa97..649fe47aa 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 93509d116..0e5debc9a 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 93093c93f..3106d698e 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 2243e8aa8..fe830bed7 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 48276feff..fb46c3bd4 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.3", + "@authing/guard-shim-react": "^4.5.6-alpha.5", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 97bffbea1..fe8a59339 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index 85022ff85..aae20e0a4 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.6-alpha.3", + "@authing/native-js-ui-components": "^4.5.6-alpha.5", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 0e068812f..5f5e03450 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 2b0368c87..f5a891846 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.3", - "@authing/native-js-ui-components": "^4.5.6-alpha.3", + "@authing/guard-shim-react": "^4.5.6-alpha.5", + "@authing/native-js-ui-components": "^4.5.6-alpha.5", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index dd8316a58..7f1d162f1 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index c295b96d9..8f3897aaf 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.6-alpha.3" + "@authing/guard-shim-react18": "^4.5.6-alpha.5" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index b38d3407f..23b6c5bd5 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 46ccf12c9..7b08cbb25 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.3", + "version": "4.5.6-alpha.5", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.6-alpha.3", + "@authing/native-js-ui-components": "^4.5.6-alpha.5", "vue": "^3.2.20" }, "devDependencies": { From 700755bd67416c4fbaa3a7e4854d04430abca8d0 Mon Sep 17 00:00:00 2001 From: zoyafng Date: Wed, 3 Jan 2024 07:01:31 +0000 Subject: [PATCH 40/44] v4.5.6-alpha.7 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 57789382f..b448a3233 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.5" + "version": "4.5.6-alpha.7" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 0debaad21..042c53815 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index fe26e1825..19ed8434c 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index d278937ff..e858f61a1 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index cabae4692..ac481639d 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index 7771f4a32..69de7efe4 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index 109e1a8c0..8b77e5505 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.5", + "@authing/guard-shim-react": "^4.5.6-alpha.7", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index de4377fba..39311a4d9 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index ce796df67..e69060898 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.5", + "@authing/native-js-ui-components": "^4.5.6-alpha.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 59431fa44..0b857d125 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 2d4d32cd8..c1ed6b4e1 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.5", - "@authing/native-js-ui-components": "^4.5.5", + "@authing/guard-shim-react": "^4.5.6-alpha.7", + "@authing/native-js-ui-components": "^4.5.6-alpha.7", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index d4abe78d7..7792a5687 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 4f6ed7be4..7327658dd 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.5" + "@authing/guard-shim-react18": "^4.5.6-alpha.7" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index d4efa2edb..96fa56687 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 51d6e61f9..0599eab10 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.5", + "version": "4.5.6-alpha.7", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.5", + "@authing/native-js-ui-components": "^4.5.6-alpha.7", "vue": "^3.2.20" }, "devDependencies": { From 3d9f090219dbd35e526b284e280fc2605653aea1 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Wed, 3 Jan 2024 15:46:27 +0800 Subject: [PATCH 41/44] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E9=93=BE=E8=B0=83=E7=94=A8=E9=98=B2=E6=AD=A2=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/_utils/locales/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/guard-core-v4/src/_utils/locales/index.ts b/packages/guard-core-v4/src/_utils/locales/index.ts index ed37ad7aa..d0b038d98 100644 --- a/packages/guard-core-v4/src/_utils/locales/index.ts +++ b/packages/guard-core-v4/src/_utils/locales/index.ts @@ -104,7 +104,7 @@ export const initGuardI18n = async ( order: detectionOrder, lookupCookie: '_authing_app_lang', caches: ['localStorage', 'cookie'], - cookieDomain: `.${getGuardDocument().domain}`, + cookieDomain: `.${getGuardDocument()?.domain}`, cookieOptions: { path: '/' }, lookupLocalStorage: '_guard_i18nextLng' //与console主要业务i18n相关的key脱离 }, From 0eaede3eb4e10ef82d8bf2534f4775df886b2e9a Mon Sep 17 00:00:00 2001 From: zoyafng Date: Wed, 3 Jan 2024 07:51:40 +0000 Subject: [PATCH 42/44] v4.5.6 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index d1929118d..0b1d793d4 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.6-alpha.5" + "version": "4.5.6" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 2b4d9f3fb..79a05dd79 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 649fe47aa..8638f1303 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 0e5debc9a..9054e762b 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 3106d698e..5b4be68f3 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index fe830bed7..f84941d34 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index fb46c3bd4..a3daaa243 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.5", + "@authing/guard-shim-react": "^4.5.6", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index fe8a59339..6027fe172 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index aae20e0a4..b18ce3aec 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.6-alpha.5", + "@authing/native-js-ui-components": "^4.5.6", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 5f5e03450..534390c13 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index f5a891846..291d6e27d 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6-alpha.5", - "@authing/native-js-ui-components": "^4.5.6-alpha.5", + "@authing/guard-shim-react": "^4.5.6", + "@authing/native-js-ui-components": "^4.5.6", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 7f1d162f1..328b2bd14 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index 8f3897aaf..cacc1341a 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.6-alpha.5" + "@authing/guard-shim-react18": "^4.5.6" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index 23b6c5bd5..a68321160 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 7b08cbb25..32c6532a6 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6-alpha.5", + "version": "4.5.6", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.6-alpha.5", + "@authing/native-js-ui-components": "^4.5.6", "vue": "^3.2.20" }, "devDependencies": { From 13c9ddf9e179cacfc963505a997a000f3205d3b5 Mon Sep 17 00:00:00 2001 From: Zoyafng Date: Thu, 4 Jan 2024 11:57:20 +0800 Subject: [PATCH 43/44] =?UTF-8?q?feat:=E9=AA=8C=E8=AF=81=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=96=87=E6=A1=88=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/guard-core-v4/src/Login/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/guard-core-v4/src/Login/index.tsx b/packages/guard-core-v4/src/Login/index.tsx index 32577cdde..a56e6d8f1 100644 --- a/packages/guard-core-v4/src/Login/index.tsx +++ b/packages/guard-core-v4/src/Login/index.tsx @@ -486,8 +486,11 @@ export const GuardLoginView: React.FC<{ isResetPage?: boolean }> = ({ tabs.push( = ({ tabs.push( Date: Thu, 4 Jan 2024 06:01:52 +0000 Subject: [PATCH 44/44] v4.5.7 --- lerna.json | 2 +- packages/guard-core-v4/package-lock.json | 2 +- packages/guard-core-v4/package.json | 2 +- packages/guard-shim-react/package.json | 2 +- packages/guard-shim-react18/package.json | 2 +- packages/native-js-ui-components/package-lock.json | 2 +- packages/native-js-ui-components/package.json | 4 ++-- packages/ng-ui-components/package-lock.json | 2 +- packages/ng-ui-components/package.json | 4 ++-- packages/react-ui-components/package-lock.json | 2 +- packages/react-ui-components/package.json | 6 +++--- packages/react18-ui-components/package-lock.json | 2 +- packages/react18-ui-components/package.json | 4 ++-- packages/vue-ui-components/package-lock.json | 2 +- packages/vue-ui-components/package.json | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lerna.json b/lerna.json index 0b1d793d4..9caee59ae 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "4.5.6" + "version": "4.5.7" } diff --git a/packages/guard-core-v4/package-lock.json b/packages/guard-core-v4/package-lock.json index 79a05dd79..19b9c0213 100644 --- a/packages/guard-core-v4/package-lock.json +++ b/packages/guard-core-v4/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/guard-core-v4/package.json b/packages/guard-core-v4/package.json index 8638f1303..e1c0a1672 100644 --- a/packages/guard-core-v4/package.json +++ b/packages/guard-core-v4/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-core", - "version": "4.5.6", + "version": "4.5.7", "description": "Authing Guard Component for core codes, only be used to internal", "types": "dist/typings/src/index.d.ts", "files": [ diff --git a/packages/guard-shim-react/package.json b/packages/guard-shim-react/package.json index 9054e762b..3358ea72b 100644 --- a/packages/guard-shim-react/package.json +++ b/packages/guard-shim-react/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react", - "version": "4.5.6", + "version": "4.5.7", "description": "Guard shim for react 16 / 17, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 5b4be68f3..37ab17d2b 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -1,6 +1,6 @@ { "name": "@authing/guard-shim-react18", - "version": "4.5.6", + "version": "4.5.7", "description": "Guard shim for react 18, only be used to internal", "types": "dist/typings/src/index.d.ts", "module": "dist/guard.min.js", diff --git a/packages/native-js-ui-components/package-lock.json b/packages/native-js-ui-components/package-lock.json index f84941d34..06103ef8d 100644 --- a/packages/native-js-ui-components/package-lock.json +++ b/packages/native-js-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/native-js-ui-components/package.json b/packages/native-js-ui-components/package.json index a3daaa243..654835c89 100644 --- a/packages/native-js-ui-components/package.json +++ b/packages/native-js-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/native-js-ui-components", - "version": "4.5.6", + "version": "4.5.7", "description": "Authing Guard for Native", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -18,7 +18,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6", + "@authing/guard-shim-react": "^4.5.7", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/ng-ui-components/package-lock.json b/packages/ng-ui-components/package-lock.json index 6027fe172..d940420ba 100644 --- a/packages/ng-ui-components/package-lock.json +++ b/packages/ng-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/ng-ui-components/package.json b/packages/ng-ui-components/package.json index b18ce3aec..dcec4b7a5 100644 --- a/packages/ng-ui-components/package.json +++ b/packages/ng-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/ng-ui-components", - "version": "4.5.6", + "version": "4.5.7", "files": [ "dist" ], @@ -29,7 +29,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", - "@authing/native-js-ui-components": "^4.5.6", + "@authing/native-js-ui-components": "^4.5.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/packages/react-ui-components/package-lock.json b/packages/react-ui-components/package-lock.json index 534390c13..953493122 100644 --- a/packages/react-ui-components/package-lock.json +++ b/packages/react-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json index 291d6e27d..96552696d 100644 --- a/packages/react-ui-components/package.json +++ b/packages/react-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react-ui-components", - "version": "4.5.6", + "version": "4.5.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,8 +19,8 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react": "^4.5.6", - "@authing/native-js-ui-components": "^4.5.6", + "@authing/guard-shim-react": "^4.5.7", + "@authing/native-js-ui-components": "^4.5.7", "react": "^16.13.1" }, "devDependencies": { diff --git a/packages/react18-ui-components/package-lock.json b/packages/react18-ui-components/package-lock.json index 328b2bd14..c82287a43 100644 --- a/packages/react18-ui-components/package-lock.json +++ b/packages/react18-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/react18-ui-components/package.json b/packages/react18-ui-components/package.json index cacc1341a..79708ddf9 100644 --- a/packages/react18-ui-components/package.json +++ b/packages/react18-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/react18-ui-components", - "version": "4.5.6", + "version": "4.5.7", "description": "Authing Guard for React", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,6 +19,6 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/guard-shim-react18": "^4.5.6" + "@authing/guard-shim-react18": "^4.5.7" } } diff --git a/packages/vue-ui-components/package-lock.json b/packages/vue-ui-components/package-lock.json index a68321160..5d8bb60ea 100644 --- a/packages/vue-ui-components/package-lock.json +++ b/packages/vue-ui-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6", + "version": "4.5.7", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/vue-ui-components/package.json b/packages/vue-ui-components/package.json index 32c6532a6..922c2a32f 100644 --- a/packages/vue-ui-components/package.json +++ b/packages/vue-ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@authing/vue-ui-components", - "version": "4.5.6", + "version": "4.5.7", "description": "Authing Guard for Vue", "main": "lib/index.min.js", "module": "lib/index.min.js", @@ -19,7 +19,7 @@ "author": "https://github.com/authing", "license": "MIT", "dependencies": { - "@authing/native-js-ui-components": "^4.5.6", + "@authing/native-js-ui-components": "^4.5.7", "vue": "^3.2.20" }, "devDependencies": {