Store JWT in cookies Strapi v4

System Information
  • Strapi Version: 4.4.1
  • Operating System: Windows 11
  • Database:
  • Node Version: 16x

Hello, how can I extend the auth controller to be able to set the JWT in cookies? I don’t want to use it in localstorage. I know it is a bad idea to store it in cookies either, but I think it is better than localstorage. Thank you.