Hello,
So I am currently working on a project where I need to be able to verify if a cookie is a vaild one or not. I am not sure really what endpoint I can use for this?
I have tried to use the https://auth.roblox.com/v1/login but I am not really having any luck with using it.
(I tried this bit of code I made but really does not seem to work).
const axios = require(`axios`).default
exports.authenticated = async function UserInfo(cookie){
let responseContent
await axios.post(`https://auth.roblox.com/v1/login`, {
headers:{
Cookie: `${cookie}`,
"Content-Length": "0"
}
})
.then(function (response) {
console.log(response)
})
.catch(async function(err){
if(err.response.status == 403){
console.log(err.response.headers)
await axios.post(`https://auth.roblox.com/v1/login`, {
headers:{
Cookie: `${cookie}`,
"Content-Length": "0",
"X-CSRF-Token": `${err.response.headers["x-csrf-token"]}`
}
})
.then(function (response){
console.log(response)
})
.catch(function(err){
console.log("Isse with second run")
})
}
})
}