Skip to content

Commit

Permalink
feat:调整语言域名映射
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoyafng committed Jan 3, 2024
1 parent ede7407 commit 6ad5e8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/guard-core-v4/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<GuardLocalConfig> = {
// mode: GuardMode.Modal,
// lang: 'en-US',
host: 'https://passkey.cj.local'
host: 'http://1229.authing.localhost:3000'
}

const onLogin = (userInfo: User) => {
Expand Down
3 changes: 3 additions & 0 deletions packages/guard-core-v4/src/_utils/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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脱离
},
Expand Down

0 comments on commit 6ad5e8b

Please sign in to comment.