{"id":20307303,"url":"https://github.com/oktadev/okta-react-node-example","last_synced_at":"2025-04-11T15:11:25.442Z","repository":{"id":39554529,"uuid":"140372338","full_name":"oktadev/okta-react-node-example","owner":"oktadev","description":"A simple React.js + Node.js example app.","archived":false,"fork":false,"pushed_at":"2023-01-07T04:06:52.000Z","size":3570,"stargazers_count":58,"open_issues_count":24,"forks_count":47,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-25T11:21:24.588Z","etag":null,"topics":["nodejs","react"],"latest_commit_sha":null,"homepage":"https://developer.okta.com/blog/2018/07/10/build-a-basic-crud-app-with-node-and-react","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oktadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-10T03:30:36.000Z","updated_at":"2024-08-30T02:47:25.000Z","dependencies_parsed_at":"2023-02-06T11:15:20.931Z","dependency_job_id":null,"html_url":"https://github.com/oktadev/okta-react-node-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-react-node-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-react-node-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-react-node-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-react-node-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oktadev","download_url":"https://codeload.github.com/oktadev/okta-react-node-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429110,"owners_count":21101783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","react"],"created_at":"2024-11-14T17:17:09.147Z","updated_at":"2025-04-11T15:11:25.411Z","avatar_url":"https://github.com/oktadev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic CRUD App with Node + React\n\nThis example app shows how to create a Node.js API and display its data with a React UI. To follow along step-by-step, [check out the blog post](https://developer.okta.com/blog/2018/07/10/build-a-basic-crud-app-with-node-and-react).\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\n**Prerequisites**: [Node.js](https://nodejs.org/en/), [Yarn](https://yarnpkg.com/lang/en/), and [SQLite](https://www.sqlite.org/index.html).\n\n## Getting Started\n\nTo install this example application, run the following commands:\n\n```bash\ngit clone https://github.com/oktadeveloper/okta-react-node-example.git\ncd okta-react-node-example\nyarn\n```\n\nThis will get a copy of the project install locally. You will need to set up some environment variables before the app will run properly.\n\nBefore you begin, you'll need a free Okta developer account. Install the [Okta CLI](https://cli.okta.com/) and run `okta register` to sign up for a new account. If you already have an account, run `okta login`.\n\nThen, run `okta apps create`. Select the default app name, or change it as you see fit. Choose **Single-Page App** and press **Enter**.\n\nChange the Redirect URI to `http://localhost:3000/login/callback` and accept the default Logout Redirect URI of `http://localhost:3000`.\n\nThe Okta CLI will create an OIDC Single-Page App in your Okta Org. It will add the redirect URIs you specified and grant access to the Everyone group. It will also add a trusted origin for `http://localhost:3000`. You will see output like the following when it's finished:\n\n```\nOkta application configuration:\nIssuer:    https://dev-133337.okta.com/oauth2/default\nClient ID: 0oab8eb55Kb9jdMIr5d6\n```\n\nNOTE: You can also use the Okta Admin Console to create your app. See [Create a React App](https://developer.okta.com/docs/guides/sign-into-spa/react/create-okta-application/) for more information.\n\nNow 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. Your Okta domain is the first part of your issuer, before `/oauth2/default`.\n\n**.env.local**\n```bash\nREACT_APP_OKTA_CLIENT_ID={yourClientId}\nREACT_APP_OKTA_ORG_URL={yourOktaOrgUrl}\n```\n\nNow you can run both the Node API server and the React frontend with the same command:\n\n```bash\nyarn start\n```\n\n## Links\n\nThis example uses the following libraries provided by Okta:\n\n* [Okta JWT Verifier](https://github.com/okta/okta-oidc-js/tree/master/packages/jwt-verifier)\n* [Okta React SDK](https://github.com/okta/okta-react)\n\n## Help\n\nPlease [raise an issue](https://github.com/oktadeveloper/okta-react-node-example/issues) if you find a problem with the example application, or visit our [Okta Developer Forums](https://devforum.okta.com/).\n\n## License\n\nApache 2.0, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-react-node-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foktadev%2Fokta-react-node-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-react-node-example/lists"}