Skip to content

Explicit authentication for emitting messages but not for listening #567

@knappdev

Description

@knappdev

Steps to reproduce

REST API works with one time authentication. But socket needs authentication everytime

import socketio from 'feathers-socketio/client';

this.app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(authentication({
storage: AsyncStorage // To store our accessToken
}));
app.io.emit('messages::create', {
"text": "I really have to iron"
}, (error, message) => {
console.log('Todo created', message);
});

emit results in no output as socket is not explicitly authenticated

Expected behavior

we can listen to server message without explicit authentication. shouldn't the behaviour be same for both emitting and listening to messages

Actual behavior

console.: Todo created undefined

React Native Version:0.43.4

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