Skip to content

[Question] How to modify response message for is_active = False accounts? #122

@XCanG

Description

@XCanG

In my project is_active used to block accounts and external table is used to provide reason. I used that functionality in DRF without issues, but I couldn't port it to Django Ninja JWT, because it's implementation is hidden.

What ninja return:

{
  "detail": "No active account found with the given credentials",
  "code": "authentication_failed"
}

urls.py:

api.register_controllers(NinjaJWTDefaultController)

I need a way to change the output and provide block reason from external table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions