{"id":16254068,"url":"https://github.com/sumn2u/react-auth0-typescript","last_synced_at":"2025-03-19T21:30:27.242Z","repository":{"id":92638242,"uuid":"119126677","full_name":"sumn2u/react-auth0-typescript","owner":"sumn2u","description":"Sample Auth0 Demo Created by Create React App with Typescript","archived":false,"fork":false,"pushed_at":"2018-01-27T04:38:26.000Z","size":145,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T21:05:54.192Z","etag":null,"topics":["auth0","react","react-router","reactjs","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumn2u.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-27T02:55:06.000Z","updated_at":"2021-08-15T14:09:00.000Z","dependencies_parsed_at":"2023-03-04T23:30:47.174Z","dependency_job_id":null,"html_url":"https://github.com/sumn2u/react-auth0-typescript","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/sumn2u%2Freact-auth0-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumn2u%2Freact-auth0-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumn2u%2Freact-auth0-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumn2u%2Freact-auth0-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumn2u","download_url":"https://codeload.github.com/sumn2u/react-auth0-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244021751,"owners_count":20385122,"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":["auth0","react","react-router","reactjs","typescript"],"created_at":"2024-10-10T15:19:55.370Z","updated_at":"2025-03-19T21:30:27.236Z","avatar_url":"https://github.com/sumn2u.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth0 React App with Token Renewal\n[![GitHub issues](https://img.shields.io/github/issues/sumn2u/react-auth0-typescript.svg)](https://github.com/sumn2u/react-auth0-typescript/issues) [![GitHub forks](https://img.shields.io/github/forks/sumn2u/react-auth0-typescript.svg)](https://github.com/sumn2u/react-auth0-typescript/network) [![GitHub stars](https://img.shields.io/github/stars/sumn2u/react-auth0-typescript.svg)](https://github.com/sumn2u/react-auth0-typescript/stargazers) [![GitHub license](https://img.shields.io/github/license/sumn2u/react-auth0-typescript.svg)](https://github.com/sumn2u/react-auth0-typescript/blob/master/LICENSE.txt) [![Twitter](https://img.shields.io/twitter/url/https/github.com/sumn2u/react-auth0-typescript.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Fsumn2u%2Freact-auth0-typescript)\n![login](auth0_login.png)\n![app](auth0_app.png)\n\u003e React Application created by create-react-app (Typescript) which includes Auth0\n\nThis sample demonstrates how to renew `access_token`s in a React application with Auth0 using `checkSession`. For more information, read [ reference documentation](https://auth0.com/docs/libraries/auth0js#using-checksession-to-acquire-new-tokens). The sample uses the create-react-app.\n\n## Getting Started\n\nCreate a new API in the [APIs section](https://manage.auth0.com/#/apis) and provide an identifier for it.\n\nClone the repo or download it from the React quickstart page in Auth0's documentation. Install create-react-app and the dependencies for the app.\n\n```bash\nnpm install -g create-react-app\ncd react-auth0-typescript\nnpm install\n```\n\n## Set the Client ID, Domain, and API URL\n\nIf you download the sample from the quickstart page, it will come pre-populated with the **client ID** and **domain** for your application. If you clone the repo directly from Github, rename the `auth0-variables.tsx.example` file to `auth0-variables.tsx` and provide the **client ID** and **domain** there. This file is located in `src/Auth/`.\n\n## Set Up `Allowed Web Origins` in the dashboard\n\nIn order to make `checkSession` work, you need to add the URL where the authorization request originates from, to the Allowed Web Origins list of your Auth0 client in the Dashboard under your client's Settings.\n\n## Run the Application\n\nThe development server that comes with create-react-app can be used to serve the application.\n\n```bash\nnpm start\n```\n\nThe application will be served at `http://localhost:3000`.\n\n## Troubleshooting\n\nIf you see an error on renewal saying `login_required`, that means you may be using the Auth0 dev keys for whichever social login you're testing. You'll need to add your own keys for this to work.\n\n## Run the Application With Docker\n\nIn order to run the example with docker you need to have `docker` installed.\n\nYou also need to set the environment variables as explained [previously](#set-the-client-id-domain-and-api-url).\n\nExecute in command line `sh exec.sh` to run the Docker in Linux, or `.\\exec.ps1` to run the Docker in Windows.\n\n## What is Auth0?\n\nAuth0 helps you to:\n\n* Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**.\n* Add authentication through more traditional **[username/password databases](https://docs.auth0.com/mysql-connection-tutorial)**.\n* Add support for **[linking different user accounts](https://docs.auth0.com/link-accounts)** with the same user.\n* Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely.\n* Analytics of how, when and where users are logging in.\n* Pull data from other sources and add it to the user profile, through [JavaScript rules](https://docs.auth0.com/rules).\n\n## Create a Free Auth0 Account\n\n1. Go to [Auth0](https://auth0.com/signup) and click Sign Up.\n2. Use Google, GitHub or Microsoft Account to login.\n\n\n## Author\n\nSuman Kunwar\n\n## License\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumn2u%2Freact-auth0-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumn2u%2Freact-auth0-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumn2u%2Freact-auth0-typescript/lists"}