#requestProfile
requestProfile
is an API to access autocomplete data, to allow one-click signups and payment in the browser.
This Chrome extension is just a proof of concept, but the API looks like this:
navigator.requestProfile(profileTypes, success, error);
Then the browser pops open a permissions dialog and, if approved, invokes the callback function with the user's data.
You can specify data to be used in the extension's options:
##Example
var error = function(type){ /* ... */ };
var success = function(profile){
Stripe.createToken({
cardNumber: profile.cardNumber
});
};
navigator.requestProfile(['firstName', 'lastName', 'cardNumber'], success, error);
##Installing the extension
git clone git://github.com/maccman/request-profile.git
- Go to Chrome -> Extensions, enter developer mode and Load unpacked extension.
- For an example, open
index.html
.