Click in order · Next.js course · Module 7: Authentication and Authorization

Session-checking Middleware

Arrange the session-checking middleware syntax in Next.js

Items to click

  • middleware(request)
  • }
  • export function
  • return NextResponse.redirect('/login')
  • { if (!session)

You can check the correct answer by solving this task in the CodeWorlds game.