How to redirect a user if the authentication token expires with nextjs.
This is simple, in my case in my project I created a utils folder and the files SSRGuest SSRGuestAuth.
SSRGuestAuth's function causes it to be redirected to the login page if auth token is expired. which is in our index file of our dashboard.
©2022 Aleksander Palamar. All rights reserved | CNPJ 26.328.604/0001-55