WebAPI/MobileIdentity
Mobile Identity API
The Mobile Identity WebAPI enables web application authors to obtain a verified phone number (MSISDN) after the user selected the number to be shared and gave explicit permission to the app to obtain it.
DOM API
dictionary MobileIdOptions {
boolean forceSelection = false;
};
partial interface Navigator {
Promise getMobileIdAssertion(optional MobileIdOptions options);
};
The returned Promise will be resolved with a verifiable BrowserId assertion containing the user's phone number as the verifiedMSISDN field or it will be rejected with a DOMError object containing one of the following error strings:
- OFFLINE
- DIALOG_CLOSED_BY_USER
Permission model
The API is exposed to Firefox OS privileged and certified applications that should list the mobileid permission in their manifests. The user needs to provide explicit permission to the origin requesting the phone number. This permission is given through the user agent chrome UI and it is remembered per origin by default.
Code example
Implementation details
Current status
Implemented and enabled in Firefox OS 2.0 and allowed for certified and privileged apps.