Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 870 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 870 Bytes

Server authentication on Next.js using JWT

PRs Welcome

it works with node version 7.8.0 or above

Main Idea

The main idea behind this example is to handle the sessions on the server, letting you validate if the user is logged before the view is rendered, as you know and if you don't know now you know 😂 to access to local storage on server render you must do componenDidMount so this example prevent the render before the validation. More info here

How it works

Clone the repo

npm install
npm run dev

Sign

You can create you're own account until you Log Out (The user will not be save); you can access using the next credentials

email: [email protected]
password: demo