This happens because of the cross-domain, I also faced this problem in my project, and I couldn't resolve it so I served my front-end from the back-end. And deployed as a single domain now it will work.