diff --git a/packages/core/src/oidc/utils.ts b/packages/core/src/oidc/utils.ts index f722a3f40..d434213d5 100644 --- a/packages/core/src/oidc/utils.ts +++ b/packages/core/src/oidc/utils.ts @@ -25,10 +25,9 @@ export const validateCustomClientMetadata = (key: string, value: unknown) => { export const isOriginAllowed = ( origin: string, - customClientMetadata: CustomClientMetadata, + { corsAllowedOrigins = [] }: CustomClientMetadata, redirectUris: string[] = [] ) => { - const { corsAllowedOrigins = [] } = customClientMetadata; const redirectUriOrigins = redirectUris.map((uri) => new URL(uri).origin); return [...corsAllowedOrigins, ...redirectUriOrigins].includes(origin); diff --git a/packages/phrases/src/locales/en.ts b/packages/phrases/src/locales/en.ts index 1c81508bd..3b3a5c3ef 100644 --- a/packages/phrases/src/locales/en.ts +++ b/packages/phrases/src/locales/en.ts @@ -136,7 +136,7 @@ const translation = { post_sign_out_redirect_uri_placeholder: 'https://your.website.com/home', cors_allowed_origins: 'CORS allowed origins', cors_allowed_origins_placeholder: 'https://your.website.com', - cors_allowed_origins_tip: 'By default, all your Redirect URIs will be allowed.', + cors_allowed_origins_tip: 'By default, all the origins of Redirect URIs will be allowed.', add_another: 'Add Another', id_token_expiration: 'ID Token expiration', refresh_token_expiration: 'Refresh Token expiration', diff --git a/packages/phrases/src/locales/zh-cn.ts b/packages/phrases/src/locales/zh-cn.ts index e2466b025..b1ed89db2 100644 --- a/packages/phrases/src/locales/zh-cn.ts +++ b/packages/phrases/src/locales/zh-cn.ts @@ -132,7 +132,7 @@ const translation = { post_sign_out_redirect_uri_placeholder: 'https://your.website.com/home', cors_allowed_origins: 'CORS Allowed Origins', cors_allowed_origins_placeholder: 'https://your.website.com', - cors_allowed_origins_tip: '所有 Redirect URI 默认为 CORS 所允许。', + cors_allowed_origins_tip: '所有 Redirect URI 的 origin 将默认被允许。', add_another: '新增', id_token_expiration: 'ID Token 过期时间', refresh_token_expiration: 'Refresh Token 过期时间',