airmap-auth

3.0.2 • Public • Published

AirMap Auth

npm version

Authenticate users with AirMap.

Requirements

To use the AirMap Auth Module a client_id must be generated from the AirMap Developer Portal. Additionally, a callback_url must be provided to AirMap in the Developer Portal to whitelist use of the module.

Sign up for an AirMap Developer Account

https://dashboard.airmap.io/developer

Version 3 Changes

We've migrated our authentication solution from Auth0 to Keycloak. This package has been updated to reflect this change.

While there are no breaking changes to the end-user experience, it is important to upgrade as the previous version will no longer work once Auth0 is deprecated.

Upgrading from v1 to v2

When updating the auth module from v1 to v2, note the following parameters have been deprecated:

  • closeable (bool)
  • onAuthorizationError (func)
  • state (obj)

Install

From CDN

<!-- Latest patch release -->
<script src="https://cdn.airmap.io/js/auth/3.0.0/airmap-auth.min.js"></script>
 
<!-- Latest minor release -->
<script src="https://cdn.airmap.io/js/auth/v3.0/index.min.js"></script>

From bower

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

From npm

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.

Documentation

Generated API Documentation

Official AirMap Docs

Demo

Clone the repo and run npm install. Open the 'index.js' file in the 'examples' folder and add the config object from the AirMap Developer Portal. Then, run npm start in the command line and navigate to http://localhost:8080/.

Note: When testing the module with the provided examples, you'll want to update the callback_url with http://localhost:8080/ in the following two places:

• 'index.js' file in the config object provided to the AirMapAuth constructor

• 'Callback URL' field in the Auth0 section of the AirMap Developer Portal

As soon as the callback_urls match, you should be good to test out the Auth Module Demo.

License

See LICENSE for details.

Dependencies (2)

Dev Dependencies (18)

Package Sidebar

Install

npm i airmap-auth

Weekly Downloads

50

Version

3.0.2

License

SEE LICENSE IN LICENSE.md

Unpacked Size

330 kB

Total Files

27

Last publish

Collaborators

  • airmap