Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "auth" #82

Open
skhilliard opened this issue Oct 1, 2021 · 0 comments
Open

Support for "auth" #82

skhilliard opened this issue Oct 1, 2021 · 0 comments

Comments

@skhilliard
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@skhilliard and others