Skip to content

Commit

Permalink
autenticacao do token
Browse files Browse the repository at this point in the history
  • Loading branch information
mathvra committed Jul 16, 2021
1 parent 6b623ff commit 8b00e0e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ export async function getServerSideProps(context) {
})
.then((resposta) => resposta.json())

// if(!isAuthenticated) {
// return {
// redirect: {
// destination: '/login',
// permanent: false,
// }
// }
// }
if(!isAuthenticated) {
return {
redirect: {
destination: '/login',
permanent: false,
}
}
}

const { githubUser } = jwt.decode(token);
return {
Expand Down

1 comment on commit 8b00e0e

@vercel
Copy link

@vercel vercel bot commented on 8b00e0e Jul 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.