Skip to content

Commit 8da0af1

Browse files
committed
fix: only wait for JWKS if not dev or test environment
1 parent ea98155 commit 8da0af1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,12 @@ export async function initApp(inOtomiStack?: OtomiStack) {
186186
let server: Server | undefined
187187
if (!inOtomiStack && !env.isTest) {
188188
// This prevents JWT verification failures during startup
189-
await waitForJwksReady()
189+
// Skip JWKS check in development mode to allow local development without Keycloak
190+
if (!env.isDev) {
191+
await waitForJwksReady()
192+
} else {
193+
debug('Skipping JWKS verification in development mode')
194+
}
190195

191196
// initialize full server
192197
const { PORT = 8080 } = process.env

0 commit comments

Comments
 (0)