mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: fix typo and lint
This commit is contained in:
parent
419fb3c91d
commit
b44068c844
2 changed files with 19 additions and 18 deletions
|
@ -2,7 +2,7 @@
|
|||
"@logto/console": patch
|
||||
---
|
||||
|
||||
fix display logic for "Always issue refresh token" and "Refresh token TTL" according to OIDC configuration
|
||||
fix display logic for "Rotate refresh token" and "Refresh token TTL" according to OIDC configuration
|
||||
|
||||
- Public clients (authentication method is none) are not allowed to disable refresh token rotation;
|
||||
- Web public applications (i.e. SPA) with refresh token rotation enabled are not allowed to set refresh token TTL.
|
||||
|
|
|
@ -127,7 +127,9 @@ function AdvancedSettings({ applicationType, oidcConfig }: Props) {
|
|||
*
|
||||
* @see rotateRefreshToken() in `packages/core/src/oidc/default.ts` for more details.
|
||||
*/}
|
||||
{[ApplicationType.Traditional, ApplicationType.MachineToMachine].includes(applicationType) && (
|
||||
{[ApplicationType.Traditional, ApplicationType.MachineToMachine].includes(
|
||||
applicationType
|
||||
) && (
|
||||
<FormField title="application_details.rotate_refresh_token">
|
||||
<Switch
|
||||
label={
|
||||
|
@ -146,14 +148,15 @@ function AdvancedSettings({ applicationType, oidcConfig }: Props) {
|
|||
}
|
||||
{...register('customClientMetadata.rotateRefreshToken')}
|
||||
/>
|
||||
</FormField>)}
|
||||
</FormField>
|
||||
)}
|
||||
{/**
|
||||
* Web public applications (i.e. SPA) with refresh token rotation enabled are not allowed
|
||||
* to set refresh token TTL, so we don't show the option here.
|
||||
*
|
||||
* @see refreshTokenTtl() in `packages/core/src/oidc/default.ts` for more details.
|
||||
*/}
|
||||
{applicationType !== ApplicationType.SPA &&
|
||||
{applicationType !== ApplicationType.SPA && (
|
||||
<FormField
|
||||
title="application_details.refresh_token_ttl"
|
||||
tip={t('application_details.refresh_token_ttl_tip')}
|
||||
|
@ -170,16 +173,14 @@ function AdvancedSettings({ applicationType, oidcConfig }: Props) {
|
|||
},
|
||||
valueAsNumber: true,
|
||||
validate: (value) =>
|
||||
value === undefined ||
|
||||
Number.isInteger(value) ||
|
||||
t('errors.should_be_an_integer'),
|
||||
value === undefined || Number.isInteger(value) || t('errors.should_be_an_integer'),
|
||||
})}
|
||||
placeholder="14"
|
||||
// Confirm if we need a customized message here
|
||||
error={errors.customClientMetadata?.refreshTokenTtlInDays?.message}
|
||||
/>
|
||||
</FormField>
|
||||
}
|
||||
)}
|
||||
{applicationType === ApplicationType.MachineToMachine && (
|
||||
<FormField title="application_details.enable_admin_access">
|
||||
<Switch
|
||||
|
|
Loading…
Reference in a new issue