I have an app running in localhost:8080
and an instance of Directus running in Docker in localhost:8055
.
I’m trying to make an API call from my app to Directus in cookie
mode, which means when I make an authentication login call to Directus with the right credentials I should see a Set-Cookie
response header that would create an access cookie on my browser, but this cookie is never created.
This is the login call I’m using:
<code>const directusOptions = {
email: '[email protected]',
password: 'admin123456',
mode: 'cookie'
}
await axios.post('http://localhost:8055/auth/login', directusOptions)
.then(response => response)
.catch(error => console.error(error.message))
</code>
<code>const directusOptions = {
email: '[email protected]',
password: 'admin123456',
mode: 'cookie'
}
await axios.post('http://localhost:8055/auth/login', directusOptions)
.then(response => response)
.catch(error => console.error(error.message))
</code>
const directusOptions = {
email: '[email protected]',
password: 'admin123456',
mode: 'cookie'
}
await axios.post('http://localhost:8055/auth/login', directusOptions)
.then(response => response)
.catch(error => console.error(error.message))
Any idea what I’m doing wrong? Why is my access cookie not being created?