Skip to content

Support for "auth" #82

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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