Open abhijit-goswami opened 9 months ago
You can modify the error message you want to give from line 147 in the public/class-jwt-auth-public.php file. If you have specific messages for certain situations, you can use a structure like switch-case.
@nurullahturkoglu This can bs used as a fix but it's not a standard way to modify plugin files. I was actually asking for a hook.
Context
I’m using JWT to authenticate users from my app, and everything works as expected.
Is there a way I can modify the error response message in /token API?
I tried jwt_auth_token_before_sign and jwt_auth_token_before_dispatch filters but these only works if the credentials are valid.