[Fixed]-Authentication to create route Django

1👍

The decorator won’t work on the ViewSet‘s list / create / …

You’ll need to deal with the authenticate by yourself.
Therefore you need to fill the DRF’s request with:

  • request._authenticator as the auth backend that has been doing the auth
  • request.user, request.auth as the result of your auth backend’s authenticate()

Leave a comment