Skip to content

maccman/request-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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.

Request Profile

You can specify data to be used in the extension's options:

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

  1. git clone git://github.com/maccman/request-profile.git
  2. Go to Chrome -> Extensions, enter developer mode and Load unpacked extension.
  3. For an example, open index.html.

About

API to access autocomplete data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published