Conversation
We'll keep the same function names. |
Also, this is awesome. (Have not yet fully reviewed) |
Woops, completely forgot about adding this to example RP. Will do in the |
Yay @seanmonstar! I'll have a look after looking at Shane's mondo logging pull. |
I just did a code skim. This is awesome and minimal. I really like the idea of making a single function argument equivalent to that function in an options block as the ❤️ |
The only comment we had was, its potentially confusing re-using the onlogin property as you're not really logging into persona now, just getting an email verification confirmation. |
ok I lied. but will look today |
welp, looks good to me, though it needs to be rebased to pick up some rpinfo changes. where do we go from here? merge it I guess? |
This reads well to me. Haven't tested directly. What happens if a site upgrades from normal Observer to Goldilocks? Could a user get stuck with |
@callahad probably... I could explicitly set loggedInUser to null if theres no onlogout. |
Oh right, I remember now. The proposed usage of goldilocks is to only call navigator.id.watch() if the user isn't logged in. Once they are, you no longer need to call watch(). Should I explicitly remove logged_in if rpAPI = stateless? |
@seanmonstar I'm digging around in my head, and the best I can come up with is:
If the best way to achieve # 2 is through nuking |
@callahad, when you say "we should throw" in (3) above, do you mean console.log the error? |
@6a68 Right now we throw an Error if you don't supply both We should similarly throw if you supply an Observer option ( |
Hey, ho, we started some tests for include.js in a PR from the other day. Who would have imagined? https://github.com/mozilla/browserid/blob/4f22fc06d62607012a046a744a47c35299c6f555/resources/static/test/cases/include.js#L48-L58 When these errors are added, please update the tests. |
@callahad ah yes, good point. wow, include.js tests! |
keeps current watch() api, but makes it "stateless" if RP doesn't want session management. to indicate this, simply don't pass an `onlogout` handler to watch(). navigator.id.watch({ onlogin: function(assertion) {} }); navigator.id.request(optionsAsNormal);
this looks good to me. @callahad thoughts? want to pull the trigger? |
nobody has objections, merging in. |
a stateless "goldilocks" api
👏 |
keeps current watch() api, but makes it "stateless" if RP doesn't want
session management. to indicate this, simply don't pass an
onlogout
handler to watch().
navigator.id.watch({ onlogin: function(assertion) {} });
navigator.id.request(optionsAsNormal);
Two notes: