When setting a custom domain on Heroku, my app doesn't store the user appropriately. (https://www.justlaunched.xyz/)
When I'm trying to make a post or put requests involving the following middleware: isAuthenticated() https://github.com/asierbayon/justlaunched/blob/master/middlewares/isAuthenticated.middleware.js
It says that the user is not authenticated when it actually should be.
Example:
- Login with Metamask
- Edit profile
- 401 comes out
When I'm trying to do this on the normal Heroku domain (https://justlaunched.herokuapp.com/), it works fine.
All the code is available publicly at https://github.com/asierbayon/justlaunched
What's working wrong with my application?