I’m setting the cookie in the response before redirecting, but it’s not there when I check in the browser. Any ideas on how to fix this or other secure ways to get the token to the frontend? I’m kinda lost here.
I encountered a similar challenge in my project. One crucial aspect to consider is the secure flag for your cookie. If you’re testing locally without HTTPS, set it to False. Additionally, ensure your frontend is configured to handle cookies properly. You might want to implement a fallback mechanism where the token is returned in the response body if cookie setting fails. This approach provides more flexibility during development and troubleshooting. Remember to thoroughly test your setup in both development and production environments to catch any environment-specific issues.
hey, hav u tried checking ur browser console? maybe try a different browser. sometimes CORS settings block cookies, which might cause this. do u think adjusting domain settings could solve the issue? i wonder if anyone else had luck with similar tweaks?