Skip to content

Support for "auth" #82

@skhilliard

Description

@skhilliard

Would it be possible to add support for "auth" in establishing a connection? I have a server that requires it for establishing a connection...here is a Javascript example from our web client...

        this.io = io(`${socketioAddress}`, <SocketIOClient.ConnectOpts>{
            perMessageDeflate: false,
            transports: ['websocket'],
            upgrade: false,
            auth: { token: `Bearer ${this.tSessionService.token}` }
        });

This shows up on the Node.js server in the socket this way...

    return async (socket, next) => {
        let encodedToken = null;
        const { token } = socket.handshake.auth;

Thanks,
Kelly

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