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

[Bug] Unauthorized error on auth user data while running through crypto-websockets example #524

Closed
afzal442 opened this issue Sep 27, 2023 · 4 comments · Fixed by #534
Closed
Labels
bug Something isn't working released

Comments

@afzal442
Copy link
Contributor

afzal442 commented Sep 27, 2023

Describe the bug

Unauthorised access issues while accepting connection over websocket

How to Reproduce

Steps to reproduce the issue
Run server and client on crypto-websockets

Error:

⚡ Running authentication on server websocket.
token bearer arb-tokenValue
userpass { username: 'alec', password: 'oviecodes' }
x 401 Unauthorized
    at WebSocketsAdapter.done (file:///workspaces/glee/dist/adapters/ws/server.js:151:29)

On client side:

GETING ERROR
x Unexpected server response: 401
    at ClientRequest.<anonymous> (/workspaces/glee/node_modules/ws/lib/websocket.js:783:7)
@afzal442 afzal442 added the bug Something isn't working label Sep 27, 2023
@afzal442
Copy link
Contributor Author

afzal442 commented Sep 27, 2023

Hey @oviecodes LMK if I have missed sth.

Edit: I guess done(true), this fixes it but for any user and pwd

@oviecodes
Copy link
Contributor

oviecodes commented Sep 27, 2023

Are you good on this @afzal442 ,

You're meant to write your authentication logic before calling done(true) or done(false), depending on the results of your logic.

@afzal442
Copy link
Contributor Author

You're meant to write your authentication logic

I am afraid, wdym?

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.26.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants