You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.
I was running into vague errors when I began adding authentication hooks, e.g.,
.../services/signature/hooks.js:44
sAuthentication.hooks.populateUser(), _feathersAuthentication.hooks.requireAut
^
TypeError: undefined is not a function
at Object.<anonymous> (hooks.js:43:15)
at Module._compile (module.js:460:26)
because I was requiring a deprecated hook:
import{hooksasauthHooks}from'feathers-authentication';exports.before={create: [
...
authHooks.requireAuth(),// bad
...
]}
when I really wanted this:
import{hooksasauthHooks}from'feathers-authentication';exports.before={create: [
...
authHooks.restrictToAuthenticated(),// good
...
]}
Then I saw the new documentation in the README which helped me out, but a clearer message in the console would be preferred. The authentication hooks documentation references the deprecated names.
The text was updated successfully, but these errors were encountered:
I was running into vague errors when I began adding authentication hooks, e.g.,
because I was requiring a deprecated hook:
when I really wanted this:
Then I saw the new documentation in the
README
which helped me out, but a clearer message in the console would be preferred. The authentication hooks documentation references the deprecated names.The text was updated successfully, but these errors were encountered: