My approach was (this way we can have a little more manual control):
from allauth.headless.account.views import SessionView
class get_user_from_sessionview(SessionView):
def dispatch(self, request, *args, **kwargs):
return request.user
then, we can easily use it like this:
get_user_from_sessionview.as_api_view(client='app')(request) # client is either 'app' or 'browser'
If I remember correctly, it returned the user object.