I'm building a web application with a Vue.js frontend and a Node REST API using express. I'm trying to work out authentication, specifically trying to go stateless using JWTs. I have them completely separated on different domains, and am using self-signed SSL certificates on both to work with HTTPS in my local environment. I've been trying to implement the JWT auth strategy outlined here which suggests using quick-expiring JWTs for authorization while having the API also pass the client a "refresh token" via httponly cookie.
The problem, I've come to realize, is that on the client side I'm using axios for submitting requests and handling responses, and httpOnly cookies aren't readable by javascript libraries like axios.
Lengthy searching doesn't seem to have any good resolution for this; all JWT auth strategies seem to suggest using httpOnly cookies in some way or another to persist logins, and there seems to be no secure way to access httpOnly cookies from axios or other javascript REST libraries. Is there any solution here? Is my problem trying to put the frontend and API on two separate domains?