All Projects → oktadev → okta-graphql-react-express-example

oktadev / okta-graphql-react-express-example

Licence: Apache-2.0 License
Web App with Express, React and GraphQL

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to okta-graphql-react-express-example

nestjs-cookie-session
Idiomatic Cookie Session Module for NestJS. Built on top of `cookie-session` 😻
Stars: ✭ 35 (+75%)
Mutual labels:  expressjs
spotify-auth-code-example-vue
VueJS boilerplate app with Spotify API authentication and data fetching.
Stars: ✭ 12 (-40%)
Mutual labels:  expressjs
cafecito
Cafecito es un proyecto hecho en Next.JS con Express.JS y MongoDB para recibir cafés ☕️ a modo de donaciones.
Stars: ✭ 95 (+375%)
Mutual labels:  expressjs
QuickStarter
Quick nodejs (Express) + docker + mongodb + JEST(testing) setup.
Stars: ✭ 12 (-40%)
Mutual labels:  expressjs
vector-tiles-generator
Easily generating mapbox vector tiles from postgis database (without mapnik dependency)
Stars: ✭ 20 (+0%)
Mutual labels:  expressjs
Book-Trading-Club
A sample application using node.js api and vuejs
Stars: ✭ 20 (+0%)
Mutual labels:  expressjs
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+155%)
Mutual labels:  expressjs
passport-examples
A variety of examples using PassportJS with ExpressJS and ReactJS applications
Stars: ✭ 44 (+120%)
Mutual labels:  expressjs
roboserver
Control OpenComputers robots without writing any code!
Stars: ✭ 52 (+160%)
Mutual labels:  expressjs
react-point-of-sale
A simple point of sale app built in nodejs and reactjs
Stars: ✭ 185 (+825%)
Mutual labels:  expressjs
watson-discovery-analyze-data-breaches
A Node.js application that demonstrates how to Import, Enrich, and see Insights about data using Watson Discovery.
Stars: ✭ 20 (+0%)
Mutual labels:  expressjs
uploading-files-react-node
Uploading files with React.js and Node.js
Stars: ✭ 33 (+65%)
Mutual labels:  expressjs
express-api-structure
Structure for Express based API server
Stars: ✭ 79 (+295%)
Mutual labels:  expressjs
trivin
⚡️Setup your entire project quickly and easily with 1-line command ⚡️
Stars: ✭ 58 (+190%)
Mutual labels:  expressjs
Books-Library-API
A starter template for building a restful API with nestjs, nodejs , expressjs , monogdb, mongoose
Stars: ✭ 21 (+5%)
Mutual labels:  expressjs
api-server
📡 API server for api.cdnjs.com - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 48 (+140%)
Mutual labels:  expressjs
mock-req-res
Extensible mock req / res objects for use in unit tests of Express controller and middleware functions.
Stars: ✭ 39 (+95%)
Mutual labels:  expressjs
deepword
Web editor based on Monaco
Stars: ✭ 25 (+25%)
Mutual labels:  expressjs
Fullstack-projects-frontend-with-react-and-backend-with-various-stacks
* W.I.P *🛠 Full-on full stack front end and a bit of back end web development challenge. Challenging every day to learn new stuffs about react & its in-depth features and also to explore the taste of various stacks.
Stars: ✭ 100 (+400%)
Mutual labels:  expressjs
mern-chatting-app
Chatting application where you can join different rooms and chat with people from around the globe.
Stars: ✭ 39 (+95%)
Mutual labels:  expressjs

Example Web App Using Express, React, and GraphQL

This example app shows how to create a GraphQL API in Express and connect it to a React web app, all with secure user authentication using Okta.

This project was bootstrapped with Create React App.

Prerequisites: Node.js and Yarn.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadev/okta-graphql-react-express-example.git
cd okta-graphql-react-express-example
yarn

This will install a local copy of the project. You will need to set up some environment variables before the app will run properly.

To integrate Okta's Identity Platform for user authentication, you'll first need to:

You will need to create an application in Okta:

  • Log in to your Okta account, then navigate to Applications and click the Add Application button
  • Select Single-Page App and click Next
  • Give your application a name (e.g. "My React App")
  • Change the Base URI to http://localhost:3000/ and the Login redirect URI to http://localhost:3000/implicit/callback, then click Done
  • Save your Client ID for later

Your Okta application should have settings similar to the following:

Okta Application Settings

You will also need to create an API token in Okta:

  • Log in to your Okta account, then navigate to API > Tokens and click the Create Token button
  • Enter a name that will help you remember what this is used for (e.g. "GraphQL Express")
  • Save the provided token value for later
    • This will only be displayed once. If you lose it, you will need to create another API token

Now create a file called .env.local in the project root and add the following variables, replacing the values with your own from the previous steps.

.env.local

REACT_APP_OKTA_CLIENT_ID={yourClientId}
REACT_APP_OKTA_ORG_URL=https://{yourOktaOrgUrl}
REACT_APP_OKTA_TOKEN={yourOktaToken}

Now you can run both the React frontend and the GraphQL server with the following command:

yarn start

Links

This example uses the Okta React SDK, the Okta Node SDK, and the Okta JWT Verifier.

Help

Please raise an issue if you find a problem with the example application, or visit our Okta Developer Forums. You can also email [email protected] if would like to create a support ticket.

License

Apache 2.0, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].