I am able to create jwt on successful user login. But when I am using jwt strategy for other routes, I am getting 'WWW-Authenticate →Token' in the header also error comes :
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing authentication"
}
{
method: 'GET',
path: '/example',
config: {
auth: {
strategy: 'jwt'
},
handler: function(request,
reply){
returnreply('Success,
youcanaccessasecureroute!');
}
}
}
If anybody knew how I remove this error please reply.