You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next.js - Hoc Client Side to authentication of page
✅ Next.js - Hoc Client Side to authentication of page
A simple client side Hoc for Next.js, in this example I use 'isAuthenticated' cookies as verification, if user authenticate it will be set to true if cookie does not exist it will be false and user is redirected to /login .
Um Hoc simples do lado do cliente para Next.js, neste exemplo eu uso cookies 'isAuthenticated' como verificação, se o usuário autenticar será definido como true se o cookie não existir será false e o usuário será redirecionado para /login.