Using JWT for context in Next JS frontend app
Unanswered
Ragdoll posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
RagdollOP
I have an express api with an authentication route, and I need to know how to setup context authentication via a JWT in a front end Next JS app. This is an example of the JWT I get back from the api auth request:
{
"tkn": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Impnv9wer8gy9348hg9vianZhbmRleWFyQG5tZy5jby56YSIsInJvbGUiOiJBZG1pbiIsImRlcGFydG1lbnQiOiJPdGhlciIsImlhdCI6MTY4OTAwNjc0OX0.ZJiIO62am6JT6BkRMeW_2UbNGN-cIHQ_nsY6UJWFBRQ",
"user": "jdoe",
"emailaddress": "johndoe@gmail.com",
"level": "Admin",
"location": "Other"
}
{
"tkn": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Impnv9wer8gy9348hg9vianZhbmRleWFyQG5tZy5jby56YSIsInJvbGUiOiJBZG1pbiIsImRlcGFydG1lbnQiOiJPdGhlciIsImlhdCI6MTY4OTAwNjc0OX0.ZJiIO62am6JT6BkRMeW_2UbNGN-cIHQ_nsY6UJWFBRQ",
"user": "jdoe",
"emailaddress": "johndoe@gmail.com",
"level": "Admin",
"location": "Other"
}
1 Reply
![Avatar](https://cdn.discordapp.com/avatars/809942393637306400/1e4e5a29a08b96de9a1e3d3520b5e771.webp?size=256)
tafutada777
are you okay disclose your token above?