dmotz / trystero

✨🤝✨ Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, Supabase, and Firebase
https://oxism.com/trystero
MIT License
1.33k stars 92 forks source link

[Question]: Detecting incorrect passwords #53

Closed brother-bill closed 4 months ago

brother-bill commented 1 year ago

I'm using joinRoom from trystero/firebase , but I'm having trouble detecting if the user's inputted password successfully connected them to the room. It seems that the library throws this error internally when failing to connect: firebase.js:122 Trystero: received malformed SDP JSON . But I'm not sure how to reliably detect that.

dmotz commented 1 year ago

Looking into adding a feature for this. Stay tuned.

dmotz commented 4 months ago

The latest release adds an optional third argument to joinRoom() that's a function to be called when there's a password mismatch (see docs).