Configure STUN/TURN with credentials from metered.ca for WebRTC

I’m currently working on a WebRTC sample project and trying to configure it with STUN/TURN servers provided by metered.ca. The TURN server configuration requires a username and credentials. However, I came across a note in the documentation stating that “appsettings.production.json cannot be used for a TURN server that requires a username and credential.”

Unfortunately, the documentation doesn’t provide any alternative methods or solutions for this setup. Has anyone encountered a similar issue or have any suggestions on how to properly configure the TURN server in this scenario?

Here’s the link to the documentation for reference: WebRTC - JavaScript client

Any guidance or advice would be greatly appreciated!

Thank you!

The reason is that it is not secure to store a password in an appsettingsfile.

Our suggestion is to have the client configured with the STUN and TURN server that should be used for communication and send the ICE Server information when the session is created. The sample demonstrates how this is done in the method initiateWebRTCSession, look for body.iceServers which ends up containing any IceServer data typed into the sample.