Using fetch with a cookie to get data from some website

1. I'm using a server action that POSTs some credentials to a login endpoint of some website and retrieves the cookie that is returned. 2. The cookie is saved on Redis. Then, I'm trying to use a different server action that POSTs to a different endpoint using the aforementioned cookie from Redis to retrieve some data. I've been testing both requests with Postman and work as expected (data is returned). However, in my application when I try to hit the data endpoint I'm getting the login page. I tried to use the cookie that Postman retrieves when I do the login through there and hardcode it into my app, and that works as expected! Any idea with what could be going on in here?
1 Reply
Kon
Kon3mo ago
Btw I've been bingeing Theo's content (discovered yesterday) and can't wait to get involved in the community
Want results from more Discord servers?
Add your server