title: How to implement a web widget with OAuth 2.0
body: <p>I want to create a web widget that will display information from my site.</p>
  
  <p>The widget will be included in the client's website HTML using JavaScript, and should only be usable for my clients -- web sites that were registered at my site.</p>
  
  <p>The information in the widget should be specific to the user who is currently visiting the client's site.</p>
  
  <p>So, I need to authenticate both the client (website owner) and the resource owner (website visitor). This seems to map nicely to OAuth 2.0, but I couldn't find a complete example or explanation for such an implementation.</p>
  
  <p>Any resources or pointers to such information will be appreciated.</p>
  
  <p><strong>Update:</strong> I've stumbled upon <a href="http://supercollider.dk/2009/01/oauth-and-client-side-widgets-154" rel="noreferrer">this article</a>, which provides an outline for an approach that uses OAuth. However, it is not detailed enough for me to really understand how to use this with OAuth 2.</p>