This repository contains a Next.js application that enables users to generate JSON Web Tokens (JWTs) for Jitsi Meet authentication. This tool is particularly useful for those who want to enhance the security of their Jitsi Meet conferences by requiring a JWT for participants to join.
The app lets users specify details for their meetings, such as the room name, date, and duration. It then utilizes the provided "secrets" (domain, app ID, and secret key) to produce a JWT, which can be appended to the Jitsi Meet URL for secure access.
Note: This app persists secrets using local storage on the client's browser. Therefore, it's crucial to keep in mind that these secrets are stored locally and not saved on the server.
-
Plan a Meeting: Specify the room name, meeting date, and its duration to generate a JWT authenticated Jitsi Meet link.
-
Store Secrets: Provide the domain, app ID, and secret key to facilitate JWT generation. These values are stored in the local storage of the browser.
-
Easy-to-use UI: The application uses the Ant Design component library to ensure a clean and intuitive user interface.
-
Secrets Tab: Before generating a JWT link, users must supply the necessary secrets:
- Domain: The domain on which the Jitsi Meet server runs.
- App ID: The application ID used for JWT authentication.
- Secret: The secret key used for signing the JWT.
-
Plan Tab: Once secrets are set, users can move to the "Plan" tab to specify their meeting details:
- Choose the meeting date and time.
- Define the duration of the meeting in hours and minutes.
- Provide a unique room name.
-
Generate the Link: After filling out the meeting details, click on "Create Meeting". The application will create a JWT and append it to the provided Jitsi Meet URL. This URL can then be shared with participants for a secure meeting.
-
Clone the Repository:
git clone https://github.com/your-username/your-repo-name.git
-
Install Dependencies:
cd your-repo-name npm install
-
Run the App:
npm run dev
-
Visit
http://localhost:3000
in your browser.
Always remember that this application only stores secrets in the local storage of the client's browser. Never commit or expose your sensitive secrets (App ID, Secret Key) in public repositories or unsecured areas.
Welcome to our easy-to-use meeting scheduler! Here's a simple guide on how to get started:
-
Planning Your Meeting: On the main screen, you'll notice two tabs: "Plan" and "Secrets". Click on the "Plan" tab.
- Select the Meeting Date: Choose your desired date and time when you'd like your meeting to occur.
- Decide the Duration: Enter how long you want your meeting to last. You'll see two fields: one for hours and another for minutes.
- Name Your Room: Think of a unique name for your meeting room so you can share it with participants.
- Hit the "Create Meeting" button, and you're set! You'll receive a special link you can share with attendees.
-
Setting Up Secrets: For first-time users or if you want to change any secret details:
- Click on the "Secrets" tab.
- Here, you will provide technical details that help keep your meetings secure. If you're not sure about these, ask your technical contact or the person who introduced you to this tool.
- Fill out the "Domain", "App ID", and "Secret" fields. Then, click the "Save" button.
Now, you're all ready to host secure meetings anytime you want!
To ensure that your Jitsi Meet instance works seamlessly with this Next.js JWT generator app, you'll need to configure JWT authentication in Jitsi. Follow these steps:
-
Edit your Jitsi Meet's
.env
file or the corresponding configuration file, typically located in/etc/jitsi/meet/
. -
Add or modify the following configuration values:
# Enable authentication.
AUTH_TYPE=jwt
# Application identifier.
JWT_APP_ID=<Your_App_ID>
# Secret used to sign JWT token, make sure it matches the secret key used in the Next.js app.
JWT_SECRET=<Your_Secret_Key>
# (Optional) Set as tokenAuthUrl in your Jitsi Meet configuration to enable guest access.
JWT_ALLOW_EMPTY=0
-
Replace
<Your_App_ID>
with the App ID and<Your_Secret_Key>
with the secret key you provided in the Next.js app. -
Save the changes and restart your Jitsi Meet server.
After these configurations, your Jitsi Meet instance will require a valid JWT (generated by the Next.js app) for participants to join meetings.
Deploying your Next.js app to Vercel is a breeze! Here's a step-by-step guide:
-
Set Up Vercel:
- First, visit Vercel's website and sign up if you haven't already. You can easily sign up with GitHub, GitLab, or Bitbucket.
-
Import Your Project:
- Once logged in, click on the "Import Project" button on your dashboard.
- Link your GitHub (or other repository hosting service) account if you haven't. Then, select the Next.js app repository you want to deploy.
-
Configure Your Project:
- Vercel will automatically detect that it's a Next.js app. Most settings will be auto-configured for you.
- Just review the default settings and click "Deploy" when you're ready.
-
Environment Variables:
- If your app uses environment variables (like secrets or API keys), navigate to the 'Settings' tab of your deployed project in Vercel. Under the 'Environment Variables' section, add any required variables. Ensure they match the names you used in your app.
-
Done!
- Vercel will now deploy your app and provide you with a live URL. You can share this URL with others, or use it to test your app in a production-like environment.
Remember, every time you push changes to your repository, Vercel will automatically re-deploy your app, so it's always up to date!
Feel free to fork this repository, create feature branches, and submit pull requests to enhance or fix any aspect of the app.
This project is licensed under the MIT License.
Enjoy secure meetings with Jitsi Meet and happy coding!