xoac everything
xoac everything

Subscribe to tonyxoac

Subscribe to tonyxoac
Share Dialog
Share Dialog


<100 subscribers
<100 subscribers
To automate our login, we're going to use the auth0-js client library. This is the same library the application uses; but we're going to do something subtly different with it.
The application uses authorize to log users in. This function redirects the user into the Auth0 lock screen, and then, post authentication, redirects the user back to the application with a token in the URL. The app parses the token (using the auth0 client library) and sets the token and the expiration of said token in the browser sessionStorage.
What we're going to do is automate our login by using login instead. First of all, we need to add auth0-js as a dependency of our e2e tests:
yarn add auth0-js --dev
To automate our login, we're going to use the auth0-js client library. This is the same library the application uses; but we're going to do something subtly different with it.
The application uses authorize to log users in. This function redirects the user into the Auth0 lock screen, and then, post authentication, redirects the user back to the application with a token in the URL. The app parses the token (using the auth0 client library) and sets the token and the expiration of said token in the browser sessionStorage.
What we're going to do is automate our login by using login instead. First of all, we need to add auth0-js as a dependency of our e2e tests:
yarn add auth0-js --dev
No activity yet