[Vuejs]-How do I get my user_id from the authorised client

0👍

You are using the TokenGuard of Laravel, There many way to let the guard recognise the authentication, the best methods:

  1. Send the token in api_token attribute in the request’s query.

    this.newOption.api_token = token;
    
  2. Send the token in Authorization header with Bearer prefix.

    { 
        headers: { 
            Authorization: 'Bearer THE_TOKEN'
        }
    }
    

Leave a comment