You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, according to XMLHttpRequest specs (which Axios uses behind the scenes), if the request doesn't have withCredentials: true, the Cookies in the response headers (set by Set-Cookie) are simply ignored.
Spent hours debugging why my browser wouldn't use the cookies from the headers, when they were clearly there...
By the way, I guess you should also add the AccessToken in the response cookies, since you'd want to send it via getStaticProps to have authentication for SSR.
The text was updated successfully, but these errors were encountered:
There is an issue with how the frontend handles cookies from the login.
bifrost/examples/bifrost-starter/apps/frontend/services/api/auth/login.ts
Line 12 in 7e5b78e
should instead read
Currently, according to XMLHttpRequest specs (which Axios uses behind the scenes), if the request doesn't have
withCredentials: true
, the Cookies in the response headers (set bySet-Cookie
) are simply ignored.Spent hours debugging why my browser wouldn't use the cookies from the headers, when they were clearly there...
By the way, I guess you should also add the AccessToken in the response cookies, since you'd want to send it via
getStaticProps
to have authentication for SSR.The text was updated successfully, but these errors were encountered: