Getting Started with Demo App
Use this guide to get a simple app spun up and get started. You'll create an app that looks similar to the Slashauth demo app.
First, create a new app in the Slashauth Dashboard. Take note of your Client ID and Client Secret because you'll need these later.

Write down your client ID and client secret for the next steps
We will run a simple frontend service that allows us to interact with the backend above. Clone the frontend demo app
git clone https://github.com/slashauth/demo-react
cd demo-react
npm install
Create a .env file and add your client ID. This is needed to identify when logging in with the Slashauth platform:
echo REACT_APP_APP_ID=<YOUR CLIENT ID> > .env
Start your app by running
npm start
. You can access it on localhost:3000
. Note: this will talk to our hosted version of the API. This endpoint allows for gasless minting of tokens. If you would rather talk to a local API, follow the steps below and instead of running
npm start
, run npm dev
instead. Note that the local backend will not be able to mint tokens because the oracle functionality is not connected in our local backend.We will run a simple backend service that allows us to fetch and store information within your SlashAuth application. Clone the backend demo repo
Create a .env file and add your client ID and client secret. This is needed to make calls to the SlashAuth service on your app's behalf:
echo CLIENT_ID=<YOUR CLIENT ID> > .env
echo CLIENT_SECRET=<YOUR CLIENT SECRET> >> .env
Now you can run your backend by running
npm start
(or alternatively run npm dev
so it recompiles on changes.)As stated above, this backend will not mint tokens for you because the oracle functionality is not hooked up.
Last modified 10mo ago