Authentication JS Module


The AirMap Authentication JS Module allows developers to easily add authentication to their web app. The Auth module provides a Lock user interface that allows users to login to AirMap, which is required to interact with certain APIs.



You must have an AirMap Developer account to use the AirMap Auth module. If you do not have an account, sign up for one at the AirMap Developer Portal.

To use the AirMap Auth module, a client_id must be generated when creating your application and obtaining in the Developer Portal. Additionally, a callback_url must be provided to AirMap in order to whitelist the use of the module. The Developer Portal provides a config file that contains all of the required information to conveniently place in your app (see example below).


The Auth module is open-source and available from a variety of sources:


AirMap CDN

<!-- Latest patch release -->
<script src=""></script>

<!-- Latest minor release -->
<script src=""></script>


bower install airmap-auth

<script src="bower_components/airmap-auth/index.min.js"></script>


npm install airmap-auth

After installing the airmap-auth module, you'll need bundle it up along with all of its dependencies using a tool like webpack or browserify. If you don't have a build process in place for managing dependencies, it is recommended that you use the module via bower or the CDN.


An example of the Auth module is included in the Github repository.

  1. Clone the repo and run npm install.
  2. Visit the AirMap Developer Portal and ensure the Callback URL is set in the Auth0 section (for this example, we are using https://localhost:8080/). Adding a Callback URL will allow you to generate an Auth0 Client ID.
  1. Copy the Config JSON object and paste into /examples/index.js
  1. Run npm start in the root directory and navigate to https://localhost:8080

Updated 2 years ago

Authentication JS Module

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.