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 theAuth
menu, selectwith Authentication
. On that same page, underAuthentication Webhooks
, setNAME
toreplit-auth
andURL
tohttps://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 APIaudience
intosrc/index.js
. Copy the Appdomain
intosrc/App.js
. Configure Auth0Allowed Callbacks URLs
,Allowed Web Origins
, andAllowed Logout URLs
tolocalhost:3000
. UnderGrant Types
, make sure the “Authorization Code” grant type is enabled. - Run
npm run start
.