Add OAuth login functionality to your GMS2 games!
Pre-requisites:
- Node.js v10 (later versions may work)
- NPM
- An application registered with a supported OAuth provider
Suported prviders
- Discord
- Github
Dependencies:
- express
- body-parser
- cookie-parser
- uuid
- express-session
- inspect
- oauth
- sqlite3
- request-promise
- axios
Steps to run
- Clone the repository to your PC and enter the folder
- Copy the file
.env.example
and call it.env
- Open the newly created
.env
file, and fill in the client and secret keys for the services you will be using - In
app.js
, comment out any of the services you don't require (ensure you comment out both therequire
andapp.use
calls)- For example, to remove Google OAuth, both the
const google = new (require('./routes/google.js'))(dbh);
andapp.use('/google',google.get_router());
lines should be commented out.
- For example, to remove Google OAuth, both the
- Replace the EXPRESS_SECRET value with a random string of characters
- Run
npm i
in the directory to install all dependencies - Start the server with
npm start
ornode app
Provider OAuth documentation: