DEV Community


Discussion on: User Authentication with Next.js

jamesvibar profile image

Hi Juan! Thank you so much for this very detailed tutorial. Aside from helping me with auth, I also got a better understanding on how getInitialProps work! :D

I just have a question. I'm in Next 9 and when I try to use withAuthSync HOC. I get a UnhandledPromiseRejectionWarning: Error: No router instance found. error whenever I visit the page with the withAuthSync HOC.

You should only use "next/router" inside the client side of your app..