| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository provides a simple implementation of user authentication for Liveblocks using JavaScript. Liveblocks is a platform that enables real-time collaborative experiences in web applications. This example demonstrates how to authenticate users and manage access to rooms.
Before you begin, ensure you have met the following requirements:
Clone the repository:
git clone https://github.com/BaseMax/liveblocks-javascript-authentication.git
cd liveblocks-javascript-authenticationInstall the dependencies:
npm installStart the backend server:
node auth.jsRun npm run dev and open the URL in the browser to see the frontend in action.
Click the "Connect to Room" button in the frontend to initiate a connection to the Liveblocks room.
The backend will handle the authentication process and return the appropriate response to the frontend.
The frontend will update the status of connected users in real-time.
liveblocks-javascript-authentication/ ├── .gitignore ├── auth.js # Backend authentication logic ├── index.html # Frontend HTML file ├── package.json # Node.js dependencies ├── package-lock.json # Lock file for package dependencies ├── README.md # Project documentation └── room.js # Liveblocks client configuration
Authenticates the user and authorizes access to a Liveblocks room.
Request Body:
{
"roomId": "string"
}
Response:
{
"token": "long string"
}
This project is licensed under the GPL-3.0 License.
Contributions are welcome! Please open an issue or submit a pull request to improve this project.
Copyright 2024, Max Base
| Back | FazBrowse Home | New Git URL |