I have been following the tutorial in https://medium.com/@flicher/laravel-rest-api-passport-authentication-for-ionic-app-3934713bcdf7 but having some trouble with the response when testing registration..
Registration is successful and the expected response by the ionic APP is JSON but the laravel response contains headers as well as JSON and returns as
<!-- CSRF Token -->
<!--
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="{{ asset('vendor/file-manager/js/file-manager.js') }}"></script>
-->
{"message":"Successfully created user!"}
Giving me the HttpResponseError
Unexpected token < in JSON at position 1
despite the registration being successful