Authentication API is used to authenticate users through LastPass MFA application. Here you can find sample codes for different platforms to consume the LastPass authentication API.
Before using the authentication API you must set up the config.properties file with the appropriate key values.
- Open the config.properties file with a text editor. This file is located under AuthAPI/java-auth/src/main/resources/config.properties for java samples, AuthAPI/python-auth/config.properties for python, and AuthAPI/nodejs-auth/config.properties for NodeJS samples.
- Go to Get Started > Instructions menu here and copy the LastPass Login key value.
- Next, set the property lastpass_login_key in your config.properties file.
How to consume authentication API?
The LastPass authentication API has the following base URL https://identity-api.lastpass.com/v2/.
Authenticates a user with LastPass.
After sending the request, a push notification will appear in the user’s smartphone. Once the user is authenticated you’ll receive a JSON object as response: