title: Token Authentication In Django Restframework Using Django-rest-auth
body: <p>I'm using vue.js for the front end of my application which is made on Django-restframework. I am using django-rest-auth for social authentication via Google.</p>
  
  <p>On the front end, I am using the vue-google-oauth2 library. The two work fine. I send an auth code from the front end and the backend responds with a token key. However, when I use curl on my terminal with the key </p>
  
  <blockquote>
    <p>curl -X GET <a href="http://127.0.0.1:8000/api/example/" rel="nofollow noreferrer">http://127.0.0.1:8000/api/example/</a> -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'</p>
  </blockquote>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>{"detail":"Authentication credentials were not provided."}</p>
  </blockquote>
  
  <p>With my terminal showing:</p>
  
  <blockquote>
    <p>[06/Mar/2019 15:38:54] "GET /newsfeed/ HTTP/1.1" 401 58</p>
  </blockquote>
  
  <p>What is it that I am supposed to do to ensure that the cookies or whatever it is at the backend to maintain my session isn't lost?</p>
  
  <p>Similarly, when I login on the front end using the oauth2 library, I refresh my page and that too shows that I am no longer logged in.</p>
  
  <p>What exactly am I missing out on?</p>