Skip to content

Conversation

@matthewhegarty
Copy link

I made some minor changes to get this example to work with django-rest-framework-jwt (without affecting the core example).

Firstly, calls to DRF failed because of HTTP 415 (unsupported media type) (SO). This was corrected by adding 'Content-Type': 'application/json' header.

Secondly, DRF returns HTTP 400 to indicate authentication failure (docs. This error needs to be caught to indicate auth failure.

Changes:

  1. Added json content-type header
  2. Enabled http.post call to handle error
  3. Enabled login component to catch errors and disallow authentication

2.  Enabled http.post call to handle error
3.  Enabled login component to catch errors and disallow authentication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant