Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

add event-based RP API #912

Closed
benadida opened this issue Jan 18, 2012 · 4 comments
Closed

add event-based RP API #912

benadida opened this issue Jan 18, 2012 · 4 comments

Comments

@benadida
Copy link
Contributor

I propose moving to an event-based API for web sites.

// this event is guaranteed to fire after window.onLoad
// so it's best if this event listener should be registered before window.onLoad
navigator.id.addEventListener('login', function(event) {
  // do things with event.assertion
});

navigator.id.get({options});

Advantages:

  • we do away with allowPersistent and silent, as those become entirely user-controlled now. The only option for that remains for now is requiredEmail.
  • firing the login event can be done in a number of cases where the reference to the callback has otherwise been lost, e.g. when returning from having verified an email if the RP page was unloaded.
@lloyd
Copy link
Contributor

lloyd commented Jan 19, 2012

suggesting 3 stars given other open issues.

@jbonacci
Copy link
Contributor

Just noting here there is a pretty good discussion with use cases in dev.identity:
http://groups.google.com/group/mozilla.dev.identity/browse_thread/thread/4e19416ef49487b9#

@lloyd
Copy link
Contributor

lloyd commented Feb 21, 2012

A proposal which fleshes out ben's original ideas is here: http://lloyd.io/a-new-api-for-browserid

@ghost ghost assigned lloyd Mar 8, 2012
@lloyd
Copy link
Contributor

lloyd commented Apr 11, 2012

'Observer' API introduced experimentally train-2012.04.11: https://gist.github.com/2287552

@lloyd lloyd closed this as completed Apr 11, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants