Next.js · Middle · Question 44 of 75

Where is the right place to check authorization in the App Router?

Explanation

Proxy is fine for optimistic checks and redirects but shouldn't be the only protection: Server Actions are called directly, and layouts don't re-render on navigation. Check the session and permissions reliably where data is read and changed. Hiding buttons on the client isn't security.

Further reading

Problem with a question

Next.js · Middle · question 44

Test yourself

Take the Next.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz