WebAPI/MobileIdentity: Difference between revisions

(Created page with "= Mobile Identity API = The Mobile Identity WebAPI enables web application authors to obtain a verified phone number ([http://en.wikipedia.org/wiki/MSISDN MSISDN]) after the u...")
 
Line 22: Line 22:
[[File:MobileIdFxosDialog.gif|480px|thumb|center|Mobile Identity Firefox OS dialog]]
[[File:MobileIdFxosDialog.gif|480px|thumb|center|Mobile Identity Firefox OS dialog]]
=== Code example ===
=== Code example ===
<code>
  function verifyAssertion(aAssertion) {
    // Make use of the [https://wiki.mozilla.org/Identity/Firefox_Accounts#Verifier remote verification API]
    // and return the verified msisdn.
  }
 
  // Request a mobile identity assertion and force the chrome UI to
  // allow the user to change a possible previous selection.
  navigator.getMobileIdAssertion({ forceSelection: true })
  .then(
    (assertion) => {
      var msisdn = verifyAssertion(assertion);
      // Do stuff with the msisdn.
    },
    (error) {
      // Process error.
    };
  );
</code>


= Implementation details =
= Implementation details =
Confirmed users
483

edits