A simple TestCafe script to test a user login using Auth0 Universal Login with a Single-page application.
- Create a Single-page Application in Auth0 and set the Allowed Callback URL to
https://jwt.io
- Make sure you have a Connection enabled for the Application and a test user to login with.
- Copy the Client ID of the Application and your Auth0 Domain/Custom Domain and add it to the
.example.env
file. Add the USERNAME and PASSWORD of a test user to the file as well. - Rename the
.example.env
file to.env
. - Run
npm install
andnpm install -g testcafe
. - Run the test using
testcafe chrome auth0-login.js
.