diff --git a/packages/guard-core-v4/example.tsx b/packages/guard-core-v4/example.tsx index b157e2c4..e34c21dc 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 1358663e..ed37ad7a 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脱离 },