GithubHelp home page GithubHelp logo

Comments (2)

miroslavpejic85 avatar miroslavpejic85 commented on July 19, 2024 1

To archive this task:

Step 1: Update .env File

Update the .env file with the following parameters for JWT token configuration:

# JWT token config
JWT_KEY=mirotalk_jwt_secret
JWT_EXP=1h

Step 2: Configure Host User Authentication

Set up host user authentication by modifying the .env file as follows:

HOST_USER_AUTH=true # Set to true to enable user authentication
HOST_USERS='[{"username": "globalUsername", "password": "globalPassword"}]' # Add global valid credentials

Step 3: Create Meeting Endpoint

Call the API to create an endpoint for the meeting. You can specify the expiration time for the token (default is 1 hour) using the following commands:

For presenter/s:

curl -X POST "https://p2p.mirotalk.com/api/v1/join" \
-H "authorization: mirotalk_default_secret" \
-H "Content-Type: application/json" \
--data '{"room":"test","name":"presenter","audio":"true","video":"true","screen":"false","hide":"false","notify":"true","token":{"username":"globalUsername","password":"globalPassword","presenter":"true", "expire":"1d"}}'

The response will provide a valid entrypoint URL for the meeting, which you can customize and share to the room presenters.

For guest/s:

curl -X POST "https://p2p.mirotalk.com/api/v1/join" \
-H "authorization: mirotalk_default_secret" \
-H "Content-Type: application/json" \
--data '{"room":"test","name":"guest","audio":"true","video":"true","screen":"false","hide":"false","notify":"true","token":{"username":"globalUsername","password":"globalPassword","presenter":"false", "expire":"1d"}}'

Step 4: Retrieve Meeting Endpoint

The response will provide a valid entrypoint URL for the meeting, which you can customize and share to your participants.

Note

Upon token expiration, users can seamlessly join the meeting without the need for re-authentication. Alternatively, if a token expires, you have the option to generate a new one directly using the API, ensuring uninterrupted access for participants. This allows for a smooth user experience, eliminating the hassle of repeated login procedures and facilitating uninterrupted meeting participation.

With the open-source flexibility, you can customize JSON Web Tokens (JWTs) to fit your needs. This includes storing data and managing logic on the server side. This approach allows for tailored authentication and authorization, boosting security and functionality to match your requirements precisely.

Documentation

from mirotalk.

miroslavpejic85 avatar miroslavpejic85 commented on July 19, 2024

Hey @tphlru!

I completely understand your perspective. I had already been considering ways to enhance host protection and user authentication, particularly through jsonwebtoken, used in MiroTalk WEB as well!

I sincerely admire your work! As a programmer, I understand very well how difficult it is to realize such a project. You have perfectly done the basic functions of large applications like zoom or zoho meetings. Thank you for that!

Thanks a bunch! ❤️ For Zoom alternative, considering MiroTalk SFU for more suitable options ideal for large group video conferences.

Please join with us in the conversation on the MiroTalk Discord forum. It's a great platform where we can collectively explore ideas and suggestions. We have the dedicated channel, allowing us to engage without cluttering the open issue space here.

Looking forward to see you on our Discrod forum!

Thank you!

from mirotalk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.