python-3.xdjango-rest-frameworkhttp-status-code-401dj-rest-auth

(401 error) After installing dj-rest-auth and deleted a user from user table, server keeps returning 401 error for all endpoints


I'm trying to use login/connect social accounts using dj-rest-auth. I use postman to test api request. I installed according to dj-rest-auth doc. I worked smoothly until I delete a user from user table.

My testing process steps:

  1. dj-rest-auth/login [user 1 credential] -> get correct result [user 1]
  2. delete [user 1] in DB
  3. dj-rest-auth/login [user 1 credential] -> user not found [401 unauthorize]
  4. dj-rest-auth/login [user 2 credential] -> user not found [401 unauthorize] ( user 2 exist in table)
  5. all other api get 401 error (user not found [401 unauthorize])

Do I need to add some setting for this case? I have no idea How deleted user affected to all other api

Please advise me. Thank you.


Solution

  • It is solved after I removed (JWT_AUTH_COOKIE = 'auth').