Zendro-dev / graphql-server

Skeleton NodeJS project for a graphQL server.
GNU General Public License v3.0
0 stars 1 forks source link

feat: Oauth2 #82

Closed coeit closed 2 years ago

coeit commented 2 years ago

Summary

This PR implements user management via a third-party OAuth2 server.

Changes

Environment

Added the following environment variables to configure the OAuth2 endpoint.

- OAUTH2_TOKEN_URI,  // required
- OAUTH2_PUBLIC_KEY,  // required
- OAUTH2_CLIENT_ID,  // required
- GRAPHIQL_REDIRECT_URI,   // required - defaults to "http://localhost:7000"
- SPA_REDIRECT_URI,  // required - defaults to "http://localhost:8080"    

removed the following environment variables as they are no longer needed.

JWT_SECRET // We use the new OAUTH2_PUBLIC_KEY variable to sign / verify tokens.

Server start up

server

User / Role models

Related PRs