This code goes with the blog post Ditto Tutorial: Online with Authentication in React.
This project was bootstrapped with Create React App.
- First run
npm install - If you haven't yet, sign in or create an account on the Ditto Portal and create an App.
- Once you have an App, copy your App ID and Playground Token into
src/ditto.js. Under theAuthmenu, selectwith Authentication. On that same page, underAuthentication Webhooks, setNAMEtoreplit-authandURLtohttps://alloweveryonewebhook.tester28.repl.co/auth(PLEASE NOTE that this webhook URL should only be used for trying out this tutorial). - Create a new App and API on auth0.com. Copy the App
domain, AppClientID, and APIaudienceintosrc/index.js. Copy the Appdomainintosrc/App.js. Configure Auth0Allowed Callbacks URLs,Allowed Web Origins, andAllowed Logout URLstolocalhost:3000. UnderGrant Types, make sure the “Authorization Code” grant type is enabled. - Run
npm run start.