I spent a couple evenings getting pseudo-authentication working with OAuth to log people into the extension, it was annoying and a real pain.
Then, the third evening, I realized that as an extension, any ajax request I make will have access to the same pool of cookies as normal browser requests, so it turned out that if a user is logged in on the site, they're automatically logged in on the extension, too.
This made everything SO much easier, but I had wasted like 8 hours of work to get there :)
I started going through a complex process to make sure everything was properly collapsed and still recorded when it suddenly occurred to me: "Hey, we already have order renewals for dvds. This is basically the same thing."
So, a day or two of complex work ended up being solved by s three line change that I should have thought of immediately. Good times. :)
edit: found it, just had to click on extensions https://chrome.google.com/webstore/detail/pushbullet/chlffgp...