I have a Plone 6 installation with pas.plugins.oidc and pas.plugins.authomatic. They are installed and enabled in the Plone/Zope site.
This is the configuration of the providers for authomatic.
{
"github": {
"id": 1,
"display": {
"title": "Github",
"cssclasses": {
"button": "plone-btn plone-btn-default",
"icon": "glypicon glyphicon-github"
},
"as_form": false
},
"propertymap": {
"email": "email",
"link": "home_page",
"location": "location",
"name": "fullname"
},
"class_": "authomatic.providers.oauth2.GitHub",
"consumer_key": "Example, please get a key and secret. See",
"consumer_secret": "Sign in to GitHub · GitHub",
"access_headers": {
"User-Agent": "Plone (pas.plugins.authomatic)"
}
},
"cmc": {
"id": 2,
"display": {
"title": "CMC",
"cssclasses": {
"button": "plone-btn plone-btn-default",
"icon": "glypicon glyphicon-lock"
},
"as_form": false
},
"propertymap": {
"email": "email",
"link": "home_page",
"location": "location",
"name": "fullname"
},
"class_": "authomatic.providers.openid.OpenID",
"access_headers": {
"User-Agent": "Plone (pas.plugins.authomatic)"
}
}
}
I don't know why openid is not found. The providers module path is correct, the openid.py is there. Can someone help me figure out what is happening?
2024-04-05 11:21:22,626 ERROR [Zope.SiteErrorLog:36][waitress-2] ModuleNotFoundError: http://localhost:3000/@login
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 391, in publish_module
Module ZPublisher.WSGIPublisher, line 285, in publish
Module ZPublisher.mapply, line 98, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module plone.rest.service, line 21, in call
Module plone.restapi.services, line 19, in render
Module pas.plugins.authomatic.services.login, line 39, in reply
Module pas.plugins.authomatic.services.login, line 17, in list_plugins
Module pas.plugins.authomatic.utils, line 42, in authomatic_cfg
Module zope.dottedname.resolve, line 46, in resolve
Module authomatic.providers.openid, line 28, in
ModuleNotFoundError: No module named 'openid'
/home/ramiro/workspace/cmcuritiba/portal-volto/backend/lib/python3.10/site-packages/pas/plugins/authomatic/utils.py(40)authomatic_cfg()
-> for provider in cfg:
(Pdb) cfg
{'github': {'id': 1, 'display': {'title': 'Github', 'cssclasses': {'button': 'plone-btn plone-btn-default', 'icon': 'glypicon glyphicon-github'}, 'as_form': False}, 'propertymap': {'email': 'email', 'link': 'home_page', 'location': 'location', 'name': 'fullname'}, 'class_': 'authomatic.providers.oauth2.GitHub', 'consumer_key': 'Example, please get a key and secret. See', 'consumer_secret': 'Sign in to GitHub · GitHub', 'access_headers': {'User-Agent': 'Plone (pas.plugins.authomatic)'}}, 'cmc': {'id': 2, 'display': {'title': 'CMC', 'cssclasses': {'button': 'plone-btn plone-btn-default', 'icon': 'glypicon glyphicon-lock'}, 'as_form': False}, 'propertymap': {'email': 'email', 'link': 'home_page', 'location': 'location', 'name': 'fullname'}, 'class_': 'authomatic.providers.openid.OpenID', 'access_headers': {'User-Agent': 'Plone (pas.plugins.authomatic)'}}}
(Pdb) from authomatic import providers
(Pdb) providers.path
['/home/ramiro/workspace/cmcuritiba/portal-volto/backend/lib/python3.10/site-packages/authomatic/providers']
(Pdb) import os
(Pdb) os.listdir('/home/ramiro/workspace/cmcuritiba/portal-volto/backend/lib/python3.10/site-packages/authomatic/providers')
['openid.py', 'pycache', 'oauth2.py', 'oauth1.py', 'persona.py', 'init.py', 'gaeopenid.py']