function getRefresh(url) {
return fetch(baseUrl + url, {credentials: 'same-origin'})
}
app.use(cors({
origin: "http://localhost:3000",
credentials: true,
}))
const {refreshToken} = req.cookies
console.log(refreshToken)=> UNDEFINED
same-origin: Send user credentials (cookies, basic http auth, etc..) if the URL is on the same origin as the calling script.А у вас разные, так с чего браузеру туда куки слать?