Forrester Consulting analysis determines that using Auth0 can yield a 548% ROI and $3.7M in identity-related savings. Read the full report: Total Economic Impact of Auth0.
If you need help with these, we have quickstart guides in our docs, including the Express quickstart that I used to set this tutorial up.
That all being said, let's write our code to construct an instance of Lock that we can use. You'll need your ClientID and Auth0 domain, which you can find in the dashboard under 'Apps/APIs', and clicking your App's name.
To set redirect mode, we set callbackURL to our server's users/authenticate route.
We also send rememberLastLogin as false -- this prevents Lock from prompting us with the last user to log in.
The returnTo option tells Auth0 where to redirect the user once it has logged out our user, allowing the server to clean up.
That's it! With just a few lines of code you have implemented Lock in your web app! In the next episode we'll talk about the options you can use to construct your Lock instance-- things like what login types to show, remembering which user was logged in last, etc.
"With just a few lines of code, you can implement Lock in your web app"