title: How to handle login JWT token in Vue JS?
body: <p>I have a token in my <strong>localstorage</strong>. if I delete the token in <strong>localstorage</strong>, then I'm not logging out.
  Can you suggest me example how to do it.</p>
  <pre><code>created() {
    if (this.vueToken) {
    let headers = {
      Authorization: &quot;Bearer &quot; + localStorage.getItem(&quot;vueToken&quot;),
    };
  
    axios
      .get(&quot;checkLogin&quot;, {
        headers: headers,
      })
      .then((response) =&gt; response);
  }else{
      this.$router.push('/login')
  }
    },
  </code></pre>