feat(core,console): support blocking token issuance on jwt customizer errors#8426
Merged
feat(core,console): support blocking token issuance on jwt customizer errors#8426
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| .changeset/pink-lemons-boil.md | 📈 +841 Bytes |
| packages/console/package.json | 📈 +67 Bytes |
| packages/console/src/assets/icons/error-handling.svg | 📈 +646 Bytes |
| packages/console/src/pages/CustomizeJwt/CreateButton/index.tsx | 📈 +63 Bytes |
| packages/console/src/pages/CustomizeJwt/CustomizerItem/index.tsx | 📈 +63 Bytes |
| packages/console/src/pages/CustomizeJwt/utils/type.ts | 📈 +21 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/GuideCard/index.tsx | 📈 +36 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/index.tsx | 📈 +2.7 KB |
| packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/index.tsx | 📈 +807 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/MainContent/index.tsx | 📈 +126 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/index.tsx | 📈 +50 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/type.ts | 📈 +17 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/use-data-fetch.ts | 📈 +50 Bytes |
| packages/console/src/pages/CustomizeJwtDetails/utils/format.test.ts | 📈 +1.86 KB |
| packages/console/src/pages/CustomizeJwtDetails/utils/format.ts | 📈 +246 Bytes |
| packages/core/src/middleware/koa-oidc-error-handler.test.ts | 📈 +375 Bytes |
| packages/core/src/oidc/extra-token-claims.test.ts | 📈 +1.6 KB |
| packages/core/src/oidc/extra-token-claims.ts | 📈 +1.37 KB |
| packages/core/src/routes/logto-config/jwt-customizer.test.ts | 📈 +12 Bytes |
| packages/core/src/routes/logto-config/logto-config.openapi.json | 📈 +344 Bytes |
| packages/integration-tests/src/mocks/jwt-customizer.ts | 📈 +31 Bytes |
| packages/integration-tests/src/tests/api/oidc/client-credentials-grant.test.ts | 📈 +1.94 KB |
| packages/integration-tests/src/tests/api/oidc/token-exchange/index.test.ts | 📈 +3.65 KB |
| packages/phrases/src/locales/ar/errors/oidc.ts | 📈 +93 Bytes |
| packages/phrases/src/locales/ar/translation/admin-console/jwt-claims.ts | 📈 +1.31 KB |
| packages/phrases/src/locales/de/errors/oidc.ts | 📈 +100 Bytes |
| packages/phrases/src/locales/de/translation/admin-console/jwt-claims.ts | 📈 +1.02 KB |
| packages/phrases/src/locales/en/errors/oidc.ts | 📈 +83 Bytes |
| packages/phrases/src/locales/en/translation/admin-console/jwt-claims.ts | 📈 +863 Bytes |
| packages/phrases/src/locales/es/errors/oidc.ts | 📈 +98 Bytes |
| packages/phrases/src/locales/es/translation/admin-console/jwt-claims.ts | 📈 +1.02 KB |
| packages/phrases/src/locales/fr/errors/oidc.ts | 📈 +99 Bytes |
| packages/phrases/src/locales/fr/translation/admin-console/jwt-claims.ts | 📈 +1.07 KB |
| packages/phrases/src/locales/it/errors/oidc.ts | 📈 +106 Bytes |
| packages/phrases/src/locales/it/translation/admin-console/jwt-claims.ts | 📈 +1.04 KB |
| packages/phrases/src/locales/ja/errors/oidc.ts | 📈 +101 Bytes |
| packages/phrases/src/locales/ja/translation/admin-console/jwt-claims.ts | 📈 +1.25 KB |
| packages/phrases/src/locales/ko/errors/oidc.ts | 📈 +93 Bytes |
| packages/phrases/src/locales/ko/translation/admin-console/jwt-claims.ts | 📈 +1 KB |
| packages/phrases/src/locales/pl-pl/errors/oidc.ts | 📈 +95 Bytes |
| packages/phrases/src/locales/pl-pl/translation/admin-console/jwt-claims.ts | 📈 +984 Bytes |
| packages/phrases/src/locales/pt-br/errors/oidc.ts | 📈 +96 Bytes |
| packages/phrases/src/locales/pt-br/translation/admin-console/jwt-claims.ts | 📈 +1002 Bytes |
| packages/phrases/src/locales/pt-pt/errors/oidc.ts | 📈 +96 Bytes |
| packages/phrases/src/locales/pt-pt/translation/admin-console/jwt-claims.ts | 📈 +1009 Bytes |
| packages/phrases/src/locales/ru/errors/oidc.ts | 📈 +124 Bytes |
| packages/phrases/src/locales/ru/translation/admin-console/jwt-claims.ts | 📈 +1.51 KB |
| packages/phrases/src/locales/th/errors/oidc.ts | 📈 +131 Bytes |
| packages/phrases/src/locales/th/translation/admin-console/jwt-claims.ts | 📈 +1.87 KB |
| packages/phrases/src/locales/tr-tr/errors/oidc.ts | 📈 +85 Bytes |
| packages/phrases/src/locales/tr-tr/translation/admin-console/jwt-claims.ts | 📈 +1020 Bytes |
| packages/phrases/src/locales/zh-cn/errors/oidc.ts | 📈 +87 Bytes |
| packages/phrases/src/locales/zh-cn/translation/admin-console/jwt-claims.ts | 📈 +856 Bytes |
| packages/phrases/src/locales/zh-hk/errors/oidc.ts | 📈 +84 Bytes |
| packages/phrases/src/locales/zh-hk/translation/admin-console/jwt-claims.ts | 📈 +856 Bytes |
| packages/phrases/src/locales/zh-tw/errors/oidc.ts | 📈 +84 Bytes |
| packages/phrases/src/locales/zh-tw/translation/admin-console/jwt-claims.ts | 📈 +856 Bytes |
| packages/schemas/src/types/logto-config/jwt-customizer.test.ts | 📈 +103 Bytes |
| packages/schemas/src/types/logto-config/jwt-customizer.ts | 📈 +48 Bytes |
d29a91e to
fd3bdf5
Compare
9a86acf to
402def3
Compare
402def3 to
617a3a8
Compare
charIeszhao
approved these changes
Mar 27, 2026
oidc-provider AccessDenied defaults to 400, which changes the existing custom JWT denyAccess behavior. Keep api.denyAccess as the access_denied exception when blockIssuanceOnError is enabled by preserving the original 403 status in the custom JWT error path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blockIssuanceOnErrorto the JWT customizer config, schema, and OpenAPI surface for both access tokens and client credentialsapi.denyAccess()asaccess_deniedwhile converting other JWT customizer runtime failures in blocking mode into localized OIDCinvalid_requestresponsesblockIssuanceOnErrorto enabled for newly created custom claims scripts in the console, while keeping existing scripts without a saved value on the legacy disabled default to avoid a breaking changeActionenumTesting
Unit tests, Integration tests





Checklist
.changeset