1. 13
    Migrate Next.js Pages Auth API Handler to App Router
    4m 13s

Migrate Next.js Pages Auth API Handler to App Router

InstructorBen Patton

Share this video with your friends

Send Tweet

We start moving our pages api routes to the app router we move our auth handler for Next Auth to the app router.

There isn't anything that we need to change to the actual code of the API handler but the way the API route is set up in the app router is a little different.

We'll rename our file to routes.ts and make sure to export the correct HTTP methods from the route.