Why am I getting 'UnauthorizedError: No authorization token was found" when matching example?

So I get the problem is there is no token in the authorization header now. The real question is how do I add it? I see the token is in the cookies from openId connect but when I try to grab it on the server side like…

audience: 'https://...',
issuer: [`https://...`],
algorithms: ['RS256'],
getToken: (req)=>{
    console.log(`trying to get token ${JSON.stringify(req.cookies["token"])}`)
    return req.cookies["token"];
}

I get

trying to get token undefined

1 Like