SuperTokens banner

SuperTokens EmailPassword Demo app

This demo app demonstrates the following use cases:

  • Login
  • Sign up
  • Logout
  • Forgot password flow
  • Session management & Calling APIs

Project setup

Use npm to install the project dependencies:

npm install

Run the demo app

This compiles and serves the React app and starts the backend API server on port 3001.

npm run dev

The app will start on http://localhost:3000

If you would like to modify the website (http://localhost:3000) or the API server (http://localhost:3001) URL:

  • Change the apiPort or apiDomain values in api-server.js
  • Change the apiPort or apiUrl values in src/App.js
  • Change the websitePort or websiteDomain values in api-server.js
  • Change the websitePort or websiteUrl values in src/App.js

Project structure & Parameters

  • The frontend code is located in the src folder.
  • The backend API is in the api-server.js file.

Production build

npm run build && npm run start

Author

Created with ❤️ by the folks at supertokens.com.

License

This project is licensed under the Apache 2.0 license.