Closed mrdj07 closed 6 years ago
This definitely makes sense, thank you for the pull request! Unfortunately, the tests are failing with
TypeError: options.errorHandler is not a function
You can run the tests locally with npm install
and then npm test
.
The most likely case is that https://github.com/feathersjs/authentication-oauth2/pull/79/files#diff-6d186b954a58d5bb740f73d84fe39073R69 should really be:
const errorHandler = typeof options.errorHandler === 'function' ?
options.errorHandler(oauth2Settings) :
defaultErrorHandler(oauth2Settings);
Great, thank you! Released as v1.1.0
I'd really need a way to customize the error redirect callback, based on the caught exception that triggered the fail. Simply allowing to have a custom errorHandler passed to the oauth() method when setting my authentication would allow me to do that.
This should be added to the documentation also.