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

Session Check Syntax in Middleware

Arrange the session check syntax in middleware:

Items to put in order

  • redirect(
  • if (!session)
  • '/login'
  • )

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