• Lead VietProDev's avatar
    fix(oidc): defer oidcCallback to prevent crash on startup · 6eb4ba59
    Lead VietProDev authored
    server.ts calls OidcService.initialize() inside the Express app setup, but
    oidcRoutes.ts was calling OidcService.callback() at module-load time — before
    initialize() had been called. This caused the server to crash immediately on
    startup with "OidcService not initialized. Call initialize() first."
    
    The fix wraps the callback in a lazy arrow function so it is only resolved
    when the route handler fires, by which point initialize() has already run.
    tsc --noEmit clean; server starts successfully after this change.
    Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
    6eb4ba59
oidcRoutes.ts 1.01 KB