News for hackers. Stuff that matters.
Re:Ask HN: How can self hosted apps(browser) converse with n... by bgdam on Monday July 27, 2015 @01:56AM (#9953584)
Make persona.com an oAuth provider. Force person a to authenticate with persona.com when they click the reshare button. Once authentication is done, personb.com knows that it has to talk to persona.com. Then call the reshare API on persona.com.

This will be a multistep process for the first reshare, but once person a is logged into persona.com and has granted access to personb.com then should be a seamless single click experience.

This provides the added benefit that only person a can reshar on persona.com.

Re:Ask HN: How can self hosted apps(browser) converse with n... by nstart on Monday July 27, 2015 @02:30AM (#9953681)
I was thinking of this. It's not a great experience, but it might be the only pure browser based options that will work. Along those lines I thought:

Person A clicks reshare. Gets asked for url. Person A types in persona.com. Immediately a window pops up which is persona.com/reshare?s=personb&id=4 or something along those lines. This is similar to what happens if you click retweet or fav on an embedded tweet right now. I'm actually ok with this workflow even if it's clunky (you have to click reshare twice to do a reshare). I just wish there was a better way to tell personb.com to automatically recognise that persona.com is associated with resharing.

Re:Ask HN: How can self hosted apps(browser) converse with n... by warcode on Monday July 27, 2015 @06:33AM (#9954359)
Make the usernames "[email protected]".

If the user is already logged in the button will act normally. If its not you simply ask them to log in. If they use [email protected] on personb.com, handle that in the login code and start the regular OpenID flow with persona.com to authenticate. personb.com is now allowed, on behalf of the user, to reshare this content on persona.com, and sends the data directly to an endpoint there.