loading...

Discussion on: User Authentication with Next.js

Collapse
giovannipds profile image
Giovanni Pires da Silva

Hi Juan! Excellent tutorial. The thing I most like it is the sync logout, that's freak!

I'll leave you one question: I'll be implementing this on my app, I'm already doing the HOCs, cookies, etc. but I'd like to redirect on logout only if I'm on a protected route. Do you have suggestion about handling this? A way to check if the page's using the HOC? If there's no other way, I'd probably end creating like a routes.js to know what page's protected but seems like a double logic for the same thing. Any approach would be good to hear.

Thank you very much!