/stytch-js-sdk-workbench

Create React App + Netlify Functions

Primary LanguageJavaScriptMIT LicenseMIT

Stytch Javascript SDK workbench

sdk This is React app showing how the Stytch Javascript SDK can be used to power authentication for your next project along with Netlify's functions

Running your own

  1. Create an account at Stytch.
  2. You'll need to set three environment variables. All can be found in the Stytch Dashboard. Create a .env file by copying .env.template in the root directory, and add the API keys from your Dashboard:
    cp .env.template .env
    
  3. Add redirect URLs within the Stytch Dashboard. Replace $domain with where the app will run- so $domain/authenticate could become http://localhost:3000/authenticate
    • $domain/authenticate?type={}
    • $domain/workbench?type={}
    • You'll want to register these as both Login and Sign-up URLs in the dashboard.
  4. Finally, you'll need to authorize the SDK to access your account information.

Starting the demo locally

npm i
npm run build
npm run client

Questions?

Feel free to reach out any time at support@stytch.com or in our Slack.