# Next.js Middleware ve Auth (React / Next.js) > Middleware, NextAuth.js, JWT, oturum yönetimi, korumalı rotalar, RBAC - 22 mülakat soruları - Mid-Level - [Mülakat Soruları: React / Next.js](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari.md) ## 1. Next.js'te middleware nedir? **Cevap** Next.js middleware, bir istek işlenmeden önce çalışan koddur; yanıtı değiştirmenize, yönlendirme yapmanıza, header eklemenize veya erişimi engellemenize olanak tanır. Optimum performans için Edge Runtime üzerinde çalışır. Genellikle kimlik doğrulama, coğrafi konum belirleme veya logging için kullanılır. ## 2. App Router ile bir Next.js projesinde middleware dosyası nereye yerleştirilir? **Cevap** middleware.ts (veya .js) dosyası, app klasörüyle aynı seviyede proje kök dizinine yerleştirilmelidir. Next.js bu dosyayı otomatik olarak algılar ve tüm rotalar için çalıştırır. Proje bu yapıyı kullanıyorsa alternatif olarak src klasörüne de yerleştirilebilir. ## 3. Middleware'in çalıştığı rotalar nasıl tanımlanır? **Cevap** Middleware'de matcher yapılandırmasını kullanmak, yol kalıpları aracılığıyla ilgili rotaları belirtmenize olanak tanır. Varsayılan olarak middleware, statik dosyalar hariç tüm rotalarda çalışır. Matcher, hedeflenen rotaların hassas kontrolü için wildcards ve regex destekler. ## 19 soru daha mevcut - Kimlik doğrulama için NextAuth.js kullanmanın temel avantajı nedir? - Next.js middleware ile bir rota nasıl korunur? Ücretsiz kaydol: https://sharpskill.dev/tr/login ## Diğer React / Next.js mülakat konuları - [JavaScript Temelleri](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/javascript-essentials.md): 25 soru, Junior - [React Temelleri](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-fundamentals.md): 20 soru, Junior - [React Hooks](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-hooks.md): 22 soru, Junior - [Bileşen yaşam döngüsü](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/component-lifecycle.md): 18 soru, Junior - [React Router](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-router.md): 20 soru, Junior - [Context ile state yönetimi](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/state-management-context.md): 18 soru, Junior - [Formlar ve Controlled Components](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/forms-controlled-components.md): 20 soru, Mid-Level - [Veri Çekme ve API](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/fetching-data-api.md): 20 soru, Mid-Level - [React Query (TanStack Query)](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-query-tanstack.md): 20 soru, Mid-Level - [Styling & CSS-in-JS](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/styling-css-in-js.md): 18 soru, Mid-Level - [Next.js Temelleri](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-fundamentals.md): 25 soru, Mid-Level - [React ile TypeScript](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/typescript-react.md): 20 soru, Mid-Level - [Next.js Veri Çekme](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-data-fetching.md): 24 soru, Mid-Level - [Next.js Server Actions](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-server-actions.md): 20 soru, Mid-Level - [Next.js Routing ve Navigasyon](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-routing-navigation.md): 22 soru, Mid-Level - [Next.js API Routes](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-api-routes.md): 20 soru, Mid-Level - [Next.js Metadata & SEO](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-metadata-seo.md): 18 soru, Mid-Level - [React Testing](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-testing.md): 20 soru, Mid-Level - [Zustand State Management](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/zustand-state-management.md): 18 soru, Mid-Level - [React Performans Optimizasyonu](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-performance-optimization.md): 22 soru, Senior - [Error Boundaries & Error Handling](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-error-boundaries.md): 18 soru, Senior - [Advanced React Patterns](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/advanced-react-patterns.md): 20 soru, Senior - [Next.js Gelişmiş Özellikler](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-advanced-features.md): 24 soru, Senior - [Next.js Dağıtım & Üretim](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-deployment-production.md): 20 soru, Senior - [Architecture & Design Patterns](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-architecture-patterns.md): 22 soru, Senior - [React Server Components](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-server-components.md): 26 soru, Senior - [Next.js Uluslararasılaştırma](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-internationalization.md): 20 soru, Senior - [React Güvenlik & En İyi Uygulamalar](https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/react-security-best-practices.md): 22 soru, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/tr/technologies/react-next/mulakat-sorulari/nextjs-middleware-auth