-
Setup the Google and GitHub applications to login by OAuth 2.0
-
Setup MongoDB to store users
-
In
server/.env
, you should specify the following environment variables:DB_USER=user_001 DB_USER_PASSWORD=k4U9F8CAL7ZLlo2K DB_CLUSTER=cluster0.3dbra GITHUB_CLIENT_ID=4b720dcceadacf37c7b7 GITHUB_CLIENT_SECRET=71e5c0e1d3c1fe42c5ebe5b6b16e2ee9fa5a1ebc GOOGLE_CLIENT_ID=957583976653-45ie8bugvuq9ekao9cneg501eg4ah6su.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=zACag4Dh1etf4KdXBRs-_NQ_ NODE_ENV=dev PORT=8000 PUBLIC_URL=http://localhost:3000 SECRET=this-is-a-secret
-
Install node dependencies:
-
Server:
cd server yarn install yarn start
-
Client:
cd client yarn install yarn start
-
-
After
http://localhost:8000/api
is running, generate the required types in the client:cd client yarn codegen:schema yarn codegen:generate
walkccc / graphql-oauth-boilerplate Goto Github PK
View Code? Open in Web Editor NEWAn OAuth app built with GraphQL, TypeScript, React, Apollo, and MongoDB