DEV Community

Discussion on: Building Vue.js Client SPA Token-Based Authentication with Laravel Sanctum

romanpaprotsky profile image
Roman Paprotsky Author • Edited on

Have you set baseURL and headers in main.js?

Vue.prototype.$http = axios
Vue.prototype.$http.defaults.baseURL = 'https://example.com/api'
Vue.prototype.$http.defaults.headers.post['Content-Type'] = 'application/json'
Thread Thread
derekbliss profile image
Derek Bliss

Just tried this and same error.

Thread Thread
romanpaprotsky profile image
Roman Paprotsky Author

Could you share your repositories? I could have a look tomorrow. My email address is roman@paprotsky.com

Thread Thread
derekbliss profile image
Derek Bliss

Cool thank you. I sent you an email.

Thank you!

Thread Thread
eugenevdm profile image
Eugene van der Merwe

Hi @derek how was this problem solved?

Thread Thread
ingenmanuelrojas profile image
Enmanuel Rojas

hi, did you manage to solve the problem?