In order to launch this app:
git clone git@github.com:descope-sample-apps/b2b-react-sample-app.git
REACT_APP_DESCOPE_PROJECT_ID="YOUR PROJECT ID" // Required for Descope authentication
REACT_APP_DESCOPE_SIGN_IN_FLOW_ID="sign-up-or-in" // Optional, if you would like to use a flow other than sign-up-or-in
REACT_APP_DESCOPE_MANAGEMENT_KEY="YOUR MANAGEMENT KEY" // Optional, if you would like to run E2E tests
DESCOPE_BASE_URL="http://localhost:8000" // Optional, if you would like to use a different base URL
You can get your project-id here. You can get this flow-id from the Flows page here.
You can use npm or yarn, but we recommend using yarn. If it isn't already installed on your machine, the instructions on how to do so can be found here. After yarn is installed, run this command:
yarn install
Run this command to start the app:
yarn start
Browse to http://localhost:3000
This app contains a user invitation route that uses a magic link. To use it, go to your project configuration and do the following
- Set the "User Invitation Redirect URL" to a URL with the path of
auth/invitation
(e.g.http://localhost:3000/auth/invitation
) - Check the Add a "Magic Link token to the invitation link" checkbox, so that the token is sent in the invitation email
To run Cypress E2E tests:
yarn run cypress open
To test Management Widgets
or SSO Setup
functionality, you'll need to have a user configured with a tenant and the Tenant Admin
role assigned.
To learn more please see the Descope Documentation and API reference page.
If you need help you can contact us