Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Auth "after" hooks and events not fired on reconnect if the first connection was unsuccessful #1714

Copy link
Copy link
@panstromek

Description

@panstromek
Issue body actions

Steps to reproduce

Using this code on client with realtime and auth on the server.

 feathers.service('authentication').hooks({
    after: {
      all: [ctx => console.log('auth')]
    }
  })
feathers.on('login', () => console.log('auth'))
feathers.on('authenticated', () => console.log('auth'))

feathers.reAuthenticate().then(/* ... */)
  1. Turn the server off.
  2. Reload the app.
  3. Get the timeout error (correct)
  4. Turn the server on
  5. Look at the dev tools - feathers reconnects, create authentication is sent, response received, but nothing shows up in the console - eg. no registered hooks or events are fired

Note:
This error happens only on the first connection, if the first attempts were unsuccessful.

Hooks and events are correctly fired if the app disconnects and reconnects again after it was already connected.

System configuration

Feathers: 4.4.1
NodeJS version: 12
Operating System: Win 10
Browser Version: Chrome 76

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.