loading...

re: Authenticating a Vue SPA is easy with Laravel Sanctum VIEW POST

FULL DISCUSSION
 

Hi. Thank you for this amazing article. ☺️
Just got a question:

    axios.get('/sanctum/csrf-cookie').then(response => {
        axios.post('/login', this.formData).then(response => {
            this.getSecrets();
        }).catch(error => console.log(error)); // credentials didn't match
    });

Why are you asking for a CSRF token right here ? I'm asking because I don't do that and I'm interested about learning something else here. 🤗
Thanks !

Code of Conduct Report abuse