UI login and create jwt token for use later in api with axios
Hi, I have a pure laravel 5.5 site running and now I want to put vuejs on some parts.
What I'm looking for is: Once the user login using the traditional UI login form then generate a jwt token and use such token in later api calls using axios.
Up today I've just seen API logins that generates the jwt token for later use, I already have the login form working with basic auth (I guess), I'm not using laravel passport.
Yeah, you can simply generate the token and store it in the users table. On login, you need to make sure you store the value in your frontend so your vue code can access it. Localstorage or a cookie works perfectly in most cases ;)