This is a MEN Stack template that includes OAuth.
Use this to go build things! 🚀
Replace <name-of-your-app-here>
in the commands below with the name of your app!
git clone https://github.com/SEI-Remote/men-stack-oauth-template.git <name-of-your-app-here>
cd <name-of-your-app-here>
Once you are in the project directory:
rm -rf .git
Here's what your command line output should like after this step (note that the indicator that we are in a git repository is gone!)
Re-initialize a git repository:
git init
Use whatever method you'd like to get your project on GitHub. If you're looking for speed though use the GitHub CLI to create a new project repository on GitHub:
gh repo create <name-of-your-app-here> --public --source .
Check out the docs here if you want to learn more about this command.
Run npm i to fetch the template's dependencies:
npm i
touch a .env file:
touch .env
Fill it with the following:
DATABASE_URL=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_CALLBACK=http://localhost:3000/auth/google/oauth2callback
GOOGLE_CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SESSION_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Replace the DATABASE_URL
, GOOGLE_CLIENT_ID
, GOOGLE_SECRET
, and SESSION_SECRET
with values that you provide.
Delete this README.md and finally, make an initial commit:
git add .
git commit -m "initial commit"
git push -u origin main
You're done!