-
Notifications
You must be signed in to change notification settings - Fork 117
Feathers client hooks don't run when calling 'authenticate' unless socket has connected #586
Comments
What exactly are you expecting? A client side |
@daffl yes it should always run... but it doesn't run when you call authenticate if
I stumbled on this while trying to |
Currently socket authentication uses a custom There was reasons for it but it turned out that it was a bad decision that will hopefully be fixed in the next version of |
My client app is using socket io to connect with server. |
This has been done in Feathers v4 authentication. The new authentication-client is calling the service methods directly and allows to register hooks. Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository. |
Steps to reproduce
const socket = io('http://google.com:6666');
client.hooks({ before (hook) { console.log(hook) } })
npm start
the app, hard refresh browser and try to log inThis file has the final app.js. there is no way to create a user with it, but the issue will manifest without connecting to the socket server... any valid looking email and password will work
https://gitlab.com/snippets/1680348
Expected behavior
auth.authenticate should trip the before hook and log to the console... whether or not the websocket server is alive or has been alive should be irrelevant.
Actual behavior
auth.authenticate does not trip the before hook
System configuration
Module versions:
Default feathers-examples-chat
"feathers-authentication": "^1.2.6",
NodeJS version: 8.7.0
Operating System: MacOS Sierra
Browser Version: Chrome 62
The text was updated successfully, but these errors were encountered: