OAuth2: authenticate with email instead of username
<p>I'm using OAuth2 with django-oauth-toolkit django-rest-framework.</p>

<p>I usually authenticate my users the following way, in order to get a token:</p>

<pre><code>curl -X POST -d "grant_type=password&amp;username=new_user&amp;password=new_user" -u "GZwzDjPM89BceT8a6ypKGMbXnE4jWSzsyqbM3dlK:" http://localhost:8000/o/token/
</code></pre>

<p>Is there a way to use the email instead of the username to authenticate my users?</p>

<p>Thanks!</p>