Once you have generated an Ignition token, you can guide the user to complete Axle’s Ignition session for the user to share their insurance information.

Using a clear call to action alongside a description of why you are requesting a user’s insurance information will increase the open rate of Ignition.

It is also recommended to include a link Axle’s consumers page in case your users have additional questions. Reach out to the Axle team for any guidance on how to design the best experience. We would love to help!

Open Ignition in new window

1

Open Ignition in new window

Add link to the the constructed ignitionUri using an anchor tag or other mechanism.

<a
  href="https://ignition.axle.insure/?token={ignitionToken}"
  target="_blank"
>
  Share your insurance via Axle
</a>
2

Process Ignition completion

Once a user completes the Ignition session, capture the authCode by either handling the parameters after Ignition redirects back to your application using the specified redirectUri or processing the ignition.completed webhook event.

This method is best used for asynchronous user interactions such as via email, SMS, push notification, etc. that do not require immediate user action after insurance verification.

Web: Display Ignition in iframe

1

Open iframe

Initialize the constructed ignitionUri within an iframe modal.

If you would like to receive MessageEvent messages to your main application Window from Ignition, you must specify an origin as a URL parameter when initalizing Ignition. The origin should not include any path, just the base domain as a URI.

Example: https://ignition.axle.insure/?origin=http://example.com

Axle recommends setting up an iframe in your application’s client that is full viewport width and height, as Ignition is optimized for responsiveness across all viewports.

For the best experience, you can set the background color and opacity (allowing a peek at your application’s views or components) of Ignition. Contact the Axle team to enable this configuration!

2

Listen for MessageEvent

Implement window.addEventListener to listen for Window MessageEvent. For added security, verify the origin of the message is the Axle Ignition base domain (e.g., https://ignition.axle.insure)
3

Process Ignition event

Process each Ignition event in your application’s client. For example, when a user completes Ignition, process the event with status=complete by sending the authCode to your application’s protected services to be exchanged for an accessToken.

Page with iframe and eventListener (example)
<html>
  <head>
    <script>
      window.addEventListener("message", (message) => {
        if (event.origin === "https://ignition.axle.insure") {
          switch (message.data.status) {
            case "complete":
              console.log("Received completed message from Axle Ignition...", message.data);
              onCompleted(message.data.authCode);
              break;
            case "exit":
              console.log("Received exited message from Axle Ignition...", message.data);
              onExited(message.data.step);
              break;
            case "error":
              console.log("Received errored message from Axle Ignition...", message.data);
              onErrored(message.data.message);
              break;
            default:
              console.log("Received unknown message from Axle Ignition...");
              break;
          }
        } else {
          // Ignore or handle messages from other origins
        }
      });
    </script>
    <style>
      .ignition {
        z-index: 999; /* Bring modal to front of page */
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        border: none;
      }
    </style>
  </head>
  <body>
    <iframe
      src="https://ignition.axle.insure/?token=ign_GZQkqPDF7JSY8vJnSU9LP&origin=http://example.com"
      class="ignition"
    ></iframe>
  </body>
</html>

Mobile: Display Ignition in native view

1

Open webview

  • On iOS, open the constructed ignitionUri within the natively supported ASWebAuthentication session (full documentation).
  • On Android, open the constructed ignitionUri within Chrome Custom Tabs (full documentation) to create an in-app session and Android App Links (full documentation) to deep-link back into your application.
2

Process Ignition event

Process each Ignition event that is returned to your application’s client. For example, when a user completes Ignition, process the event with status=complete by sending the authCode to your application’s protected services to be exchanged for an accessToken.

Congrats!

At this stage the user will now be able to securely connect their insurance account via Axle 🎉.