Since SSO is such an hot topic here, I want to present a new plugin discourse that allows SSO via a rails app using doorkeeper. Details with link to the code on github can be found here:
http://dev.mikamai.com/post/75881921043/discourse-single-sign-on-with-oauth-and-doorkeeper
Any improvement appreciated!
Andrea