GithubHelp home page GithubHelp logo

isabella232 / okta-graphql-api-react-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oktadev/okta-graphql-api-react-example

0.0 0.0 0.0 385 KB

GraphQL API + React Example

Home Page: https://developer.okta.com/blog/2020/11/23/quick-graphql-react-app

License: Apache License 2.0

JavaScript 83.41% CSS 5.82% HTML 10.77%

okta-graphql-api-react-example's Introduction

GraphQL API + React Example

This repository is an example application that shows how to create a GraphQL API and consume it from React.

Please read Quickly Consume a GraphQL API from React for a tutorial that explains how to build this example.

Getting Started

Prerequisites: Node 14.

To install this example, run the following commands:

git clone https://github.com/oktadeveloper/okta-graphql-api-react-example.git graphql-api
cd graphql-api

Run npm install to install all this project's dependencies.

Create an OIDC App on Okta

To Begin, install the Okta CLI, open a new terminal window, and run okta register to sign up for a new account. If you already have an account, run okta login. Then, run okta apps create. Select the default app name, or change it as you see fit. Choose Single-Page App and press Enter.

Use http://localhost:3000/callback for the Redirect URI and accept the default Logout Redirect URI of http://localhost:3000.

Copy your Okta settings to a .env file in the root directory of your cloned app.

REACT_APP_OKTA_CLIENTID={yourOktaClientId}
REACT_APP_OKTA_URL_BASE=https://{yourOktaDomain}
REACT_APP_OKTA_APP_BASE_URL=http://localhost:3000
REACT_APP_EVERBASE_API_KEY={yourEverbaseApiKey}

When the installation completes, run npm start and marvel at your React app with OIDC authentication!

For the Everbase API key, please read the blog post.

Help

Please post any questions as comments on this repo's blog post, or visit our Okta Developer Forums.

License

Apache 2.0, see LICENSE.

okta-graphql-api-react-example's People

Contributors

indiepopart avatar mraible avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.