title: get auth token using dj-rest-auth when user logged in
body: <p>Previously I was using <code>django-rest-auth</code> package and I was getting the <code>auth token</code> when user <code>log in</code> in response <code>response.data.key</code> and this <code>auth token</code> or <code>key</code> was working fine with the api calls as <code>authentication auth</code></p>
  <p>Previously for <code>django-rest-auth</code>:</p>
  <pre><code>&quot;/rest-auth/login/&quot;
  </code></pre>
  <p>was getting the <code>response.data.key</code> as <code>auth token</code> and that was working
  I have stored in the cookie for later use</p>
  <pre><code>.get(&quot;/rest-auth/user/&quot;, {
       headers: {
         &quot;Content-Type&quot;: &quot;application/json&quot;,
         Authorization: &quot;Token &quot; + response.data.key + &quot;&quot;,
         },
    })
  </code></pre>
  <p>It was working to get info on user and also was working when used in other api calls by setting it in</p>
  <pre><code>Authorization: &quot;Token &quot; + response.data.key + &quot;&quot;
  </code></pre>
  <p>But now, I'm using <code>dj-rest-auth</code> package instead of <code>django-rest-auth</code> and shifted my urls to</p>
  <pre><code>/dj-rest-auth/login
  </code></pre>
  <p>and I'm not getting any <code>key</code> or <code>auth token</code> that I can use for <code>authorization</code> in header.</p>
  <pre><code>.get(&quot;/dj-rest-auth/user/&quot;, {
       headers: {
         &quot;Content-Type&quot;: &quot;application/json&quot;,
         Authorization: &quot;Token &quot; + response.data.? + &quot;&quot;,
         },
    })
  
  </code></pre>
  <p>It's not working because now I'm getting <code>access_token</code> , <code>refresh_token</code> and <code>user info</code>. I tried to use <code>access_token</code> and <code>refresh_token</code> for <code>authorization</code> in header but it's not working because I'm not getting <code>key</code> or <code>auth token</code> in response when user <code>log in</code></p>
  <p>Note: <code>django-rest-auth</code> is no more maintained and <code>dj-rest-auth</code> is forked from the previous one and have more functions (this is the reason why I'm switching)</p>
  <p>How to get <code>auth token</code> or <code>key</code> by using <code>dj-rest-auth</code> package so that I can use it in the <code>header</code> of API calls for authorization?</p>