@vvkgaming/colyseussocialcustom
v0.10.9
Published
Authentication and Social features for Colyseus
Downloads
5
Maintainers
Readme
Features
- Authenticate with Facebook
- Get list of user's friends
- Get list of user's online friends
- Friend requests (send, accept, decline)
- Block user
Authentication Providers
- Anonymous
- ...more coming soonish!
Environment Variables
MONGO_URI
: MongoDB connection URIJWT_SECRET
: Secure secret string for authentication.
For Facebook:
FACEBOOK_APP_TOKEN
: Facebook App Token ("appid|appsecret"
)
For Push Notifications
WEBPUSH_SUBJECT
- mailto: or URL.WEBPUSH_PUBLIC_KEY
- VAPID Public KeyWEBPUSH_PRIVATE_KEY
- VAPID Private Key
You can generate VAIPD keys using npx web-push generate-vapid-keys
Integration with your Node.js Web Framework
Express
import express from "express";
import socialRoutes from "@colyseus/social/express"
const app = express();
app.use("/", socialRoutes);
app.listen(8080);
TODO's
- Friend request notification (https://github.com/appfeel/node-pushnotifications)
- On mobile
- In the browser
License
MIT License.