The firefox tells me that I need to put the value “None” in the somesite attribute, but when I set it, the browser still thinks that Lax is used there, instead of None
Code:
app.use(
cors({
origin: "https://59e5-185-9-186-241.ngrok-free.app",
methods: ["GET", "POST"],
allowedHeaders: ["Content-Type", "Authorization"],
credentials: true,
}),
);
app.post("/api/auth/telegram", (req, res) => {
const userData = req.body;
// Проверяем подпись
if (!validateTelegramAuth(userData)) {
console.log("Неверная подпись Telegram");
return res.status(403).json({ message: "Неверная подпись Telegram" });
}
// Генерируем JWT токен
const token = generateAuthToken(userData);
res.cookie('authToken', token, {
httpOnly: true,
secure: true,
sameSite: 'None',
partitioned: true,
maxAge: 7 * 24 * 60 * 60 * 1000,
});
res.cookie('user', userData, {
httpOnly: true,
secure: true,
sameSite: 'None',
partitioned: true,
maxAge: 7 * 24 * 60 * 60 * 1000,
});
console.log("Токен сгенерирован и отправлен:", token);
return res.json({ token });
});
I rebooted the server, accessed chatGPT, looked for solutions and similar cases on the Internet

