Plone as OAuth2 provider?

Is there a solution for using Plone (5) as an OAuth2 provider?

@zopyx ... did you get anywhere with this? I'm trying to use pmr2.oauth. It gets me 90% of the way.
It looks like I'll need to fix a broken z3cform-based template.

So far, I've done the following:
Starting with Plone 5.1 and Python 2.7 I pin oauthlib = 2.1.0 in versions.

My buildout.cfg looks like this:

eggs = 
     pmr2.oauth
zcml =
     pmr2.oauth

[versions]
....
oauthlib = 2.1.0

With that I was able to configure an Oauth2 provider.
The key tasks can be managed from /@@pmr2-oauth

I'm stuck configuring the scope because of the broken template.

The content type scope manager
Gives an error when I attempt to add a scope profile:

image

I cannot add a scope profile until I troubleshoot this:

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module z3c.form.form, line 239, in __call__
Module z3c.form.form, line 281, in render
Module z3c.form.form, line 162, in render
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 137, in pt_render
Module five.pt.engine, line 98, in __call__
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module 449871056996e1019d5e9ba2cfb89414.py, line 208, in render
Module 46f918c9c072b9fe8d1d86a35d9b7b08.py, line 254, in render_main
Module five.pt.expressions, line 154, in __call__
Module five.pt.expressions, line 126, in traverse
Module zope.traversing.adapters, line 142, in traversePathElement
__traceback_info__: (<Products.Five.metaclass.manage-ctsp object at 0x7fc8695945d0>, 'main_template')
Module zope.traversing.adapters, line 53, in traverse
__traceback_info__: (<Products.Five.metaclass.manage-ctsp object at 0x7fc8695945d0>, 'main_template', ('macros', 'master'))
Module Products.Five.browser.metaconfigure, line 482, in __getitem__
AttributeError: 'NoneType' object has no attribute 'macros'

 - Expression: "context/main_template/macros/master"
 - Filename:   ... .3-py2.7.egg/pmr2/z3cform/templates/plone-main-macros.pt
 - Location:   (line 8: col 33)
 - Source:     ... etal:use-macro="context/main_template/macros/master">
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7fc869cb7350>
               views: <ViewMapper - at 0x7fc869594290>
               modules: <instance - at 0x7fc87479d098>
               args: <tuple - at 0x7fc87c942050>
               here: <ImplicitAcquisitionWrapper manage-ctsp at 0x7fc86be31870>
               user: <ImplicitAcquisitionWrapper - at 0x7fc86bbb5190>
               nothing: <NoneType - at 0x8f5320>
               container: <ImplicitAcquisitionWrapper manage-ctsp at 0x7fc86be31870>
               request: <instance - at 0x7fc8694c0560>
               wrapped_repeat: <SafeMapping - at 0x7fc863f0fd60>
               traverse_subpath: <list - at 0x7fc8694c0dd0>
               default: <object - at 0x7fc87c860540>
               loop: {...} (0)
               context: <ImplicitAcquisitionWrapper manage-ctsp at 0x7fc86be31870>
               view: <ContentTypeScopeProfileAddForm add at 0x7fc869594b10>
               translate: <function translate at 0x7fc8680dc938>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fc869f0d820>
               options: {...} (0)
               target_language: <NoneType - at 0x8f5320>

Did you ever get this to work?
I tried to install it, but get ImportError: Module pmr2 has no global auth which is a bit odd, since it looks like it has

Actually, I abandoned it.