curved-knife-24489
03/26/2024, 6:34 AM/oauth2/token endpoint. I run the following code but not matter what i do it returns { active: false } from ory servers. Following is the code snippet i use.
await <http://axios.post|axios.post>(`${oryUrl}/admin/oauth2/introspect`, {
token: req.headers.authorization.split(' ')[1]
}, {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then(async resp => {
if (!resp.data.active)
return res.status(401).send({
data: null,
message: 'Access token is not active. Please refresh the token',
success: false
})
console.log(resp.data)
return res.status(201).send({
...
})
}).catch(ex => {
....
})curved-knife-24489
03/26/2024, 7:23 AM