Httponly cookie not being set stored (Laravel Vue) | vue cookie httponly
IhavebeenstrugglingwiththisforafewhoursnowonhowtosolvethisissueandIjustcantseemtobeabletogetarounditfornow.AmbuildingasimpleauthenticationsystemwithaVuefront-end(createdusingvue-cli)andLaravel5.8(api)forthebackend;totestouttheideaofusinghttponlycookieforauthenticationandprotectionofaccesstocertainroutesafterreadingthis[1]article.Iamusingtymondesigns/jwt-auth[2]forauthenticationinsteadoflaravelpassport[3]asusedinthearticleandamalsousingbarryvdh/laravel-cors[4]packagetoaddCORS(Cross-OriginReso...
I have been struggling with this for a few hours now on how to solve this issue and I just cant seem to be able to get around it for now.
Am building a simple authentication system with a Vue front-end(created using vue-cli) and Laravel 5.8(api) for the backend; to test out the idea of using httponly cookie for authentication and protection of access to certain routes after reading this[1] article. I am using tymondesigns/jwt-auth[2] for authentication instead of laravel passport[3] as used in the article and am also using barryvdh/laravel-cors [4] package to add CORS (Cross-Origin Resource Sharing) headers support.
BACKENDHere is my code in the routes/api.php
Route::group([prefix => auth, namespace => Auth], function () { Route::post(login, AuthController@login); Route::group([middleware => [auth.api],], function () { Route::get(me, AuthController@me); Route::post(logout, AuthController@logout); }); ...