{"id":24308002,"url":"https://github.com/miniorangedev/miniorange-react-jwt-authentication-example-app","last_synced_at":"2025-08-30T23:37:53.986Z","repository":{"id":272241405,"uuid":"863483696","full_name":"miniOrangeDev/miniorange-react-jwt-authentication-example-app","owner":"miniOrangeDev","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-13T06:41:13.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T07:25:54.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miniOrangeDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-26T11:26:31.000Z","updated_at":"2025-01-13T06:41:16.000Z","dependencies_parsed_at":"2025-01-15T00:36:04.558Z","dependency_job_id":null,"html_url":"https://github.com/miniOrangeDev/miniorange-react-jwt-authentication-example-app","commit_stats":null,"previous_names":["miniorangedev/miniorange-react-jwt-authentication-example-app"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniOrangeDev%2Fminiorange-react-jwt-authentication-example-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniOrangeDev%2Fminiorange-react-jwt-authentication-example-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniOrangeDev%2Fminiorange-react-jwt-authentication-example-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniOrangeDev%2Fminiorange-react-jwt-authentication-example-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miniOrangeDev","download_url":"https://codeload.github.com/miniOrangeDev/miniorange-react-jwt-authentication-example-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242272694,"owners_count":20100696,"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":[],"created_at":"2025-01-17T04:34:36.257Z","updated_at":"2025-03-06T19:28:36.181Z","avatar_url":"https://github.com/miniOrangeDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Authentication in React App with miniOrange\n\nThis guide outlines the steps to quickly integrate JWT authentication into your React app using miniOrange as the Identity Provider. \n\n# Installation\n\nIn the project directory, you can run:\n\n### `npm install`\n\nThis will install all the necessary dependencies. The page will automatically reload when you make changes. You may also see any lint errors in the console.\n\n## Configure MiniOrange\n\nIf you have not created an account in MiniOrange, please create using [this](https://www.miniorange.com/iam/free-trial) link.\n\n### 1. Create a React JWT Application in the miniOrange Dashboard\n\nVisit the [miniOrange Dashboard](https://login.xecurify.com) and create a new React [JWT Application](https://www.miniorange.com/iam/content-library/admin-docs/how-to-add-jwt-app).\n\n### 2. Configure Your React Application\n\nIf you're using an existing React application, make sure the following settings are properly configured:\n\n- **Redirect URL**: `http://localhost:3002`\n- **Logout URL**: `http://localhost:3002`\n\nThese URLs should reflect the origins where your application is running. Allowed Callback URLs may also include a path, depending on where you're handling the callback in your app.\n\n### 3. Set miniOrange as the Primary Identity Provider\n\n- In the \"Primary Identity Provider\" section, select **miniOrange**.\n- Click **Save**.\n\n### 4. Download the RSA256 Certificate\n\n- Go to **Apps**, and from the dropdown next to your configured React App, click **Select**.\n- Click on **Certificate** to download the RSA256 certificate.\n- Place the downloaded certificate in the `src` folder of your miniorange-react-jwt-authentication-example-app.\n- In `TokenHandler.js`, ensure the certificate is imported with the name `RSA256Cert.crt`. If you change the file name, update the import statement accordingly.\n\n![Downloading RSA256 Certificate](./src/images/downloadCert.png)\n\n### 5. Set Up Endpoints\n\n- Click **Edit** from the dropdown next to your app in the miniOrange dashboard.\n- Scroll down to the **Endpoints** section.\n- As miniOrange is the primary Identity Provider, copy the **SSO URL for using miniOrange as Authentication Source** provided in the Endpoints section.\n- Go to `.env` file, replace `SSO_URL` with the copied **SSO URL**.\n\n### 7. Configure Single Logout (SLO) URL in Home.js\n\n- Copy the **Single Logout URL** from the Endpoints section.\n- Go to `.env` file, replace `SLO_URL` with the copied **Single Logout URL**.\n\n### 8. Create a User in miniOrange\n\nIf you haven't already, [create a user](https://www.miniorange.com/iam/content-library/admin-docs/manage-users) in miniOrange.\n\n### 9. Run the Application\n\nIn the project directory, run:\n\n### `npm start`\n\nNavigate to `http://localhost:3002`. Your `miniorange-react-jwt-authentication-example-app` should now be running.\n\n### 10. Test the Login\n\nClick the **Login** button. You’ll be redirected to the miniOrange login page. Enter the user’s credentials, and you’ll be logged into the miniOrange React app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminiorangedev%2Fminiorange-react-jwt-authentication-example-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminiorangedev%2Fminiorange-react-jwt-authentication-example-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminiorangedev%2Fminiorange-react-jwt-authentication-example-app/lists"}