The situation
Currently, in the error.handler file, we checks if the error type of AuthenticationErrror by its name and not by its type (instanceof).
Todo:
For making the code more beauty and generic, we need to create type definition for the AuthenticationError error defined in passport/lib/errors/authenticationerror.js
The situation
Currently, in the
error.handlerfile, we checks if the error type ofAuthenticationErrrorby its name and not by its type (instanceof).Todo:
For making the code more beauty and generic, we need to create type definition for the
AuthenticationErrorerror defined inpassport/lib/errors/authenticationerror.js