-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to new module API #10
base: master
Are you sure you want to change the base?
Conversation
This ports the auth provider to the new module API of Synapse 1.46+. Docs: https://matrix-org.github.io/synapse/latest/modules/password_auth_provider_callbacks.html Based on anishihara@6c29f4d by @anishihara Fixes ma1uta#9
I'm getting following error using this in a ansible deploy: Dec 20 20:56:00 rc21s1404 matrix-synapse[655791]: 2021-12-20 19:56:00,875 - root - 350 - WARNING - main - Server /usr/local/lib/python3.8/site-packages/synapse/app/homeserver.py version 1.49.0 Dec 20 20:56:00 rc21s1404 matrix-postgres[651253]: 2021-12-20 19:56:00.905 UTC [67] WARNING: there is already a transaction in progress Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: 2021-12-20 19:56:01,019 - synapse.handlers.auth - 1924 - ERROR - sentinel - Error while initializing <class 'rest_auth_provider.RestAuthProvider'>: init() got an unexpected keyword argument 'account_handler' Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: 2021-12-20 19:56:01,020 - synapse.app._base - 242 - CRITICAL - sentinel - Error during startup Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: Traceback (most recent call last): Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: await cb(*args, **kwargs) Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: await _base.start(hs) Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: load_legacy_password_auth_providers(hs) Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: load_single_legacy_password_auth_provider( Dec 20 20:56:01 rc21s1404 matrix-synapse[655791]: provider = module(config=config, account_handler=api) |
Which synapse version are you using? Did you remove the legacy modules:
- module: "rest_auth_provider.RestAuthProvider"
config:
endpoint: "http://change.me.example.com:12345" |
This is required as the function was updated to take this explicit type, rather than just the localpart, in matrix-org/synapse#15458 as part of version 1.83. This is stacked atop ma1uta#10 to ensure everything is updated.
This ports the auth provider to the new module API of Synapse 1.46+.
Docs: https://matrix-org.github.io/synapse/latest/modules/password_auth_provider_callbacks.html
Based on anishihara@6c29f4d by @anishihara
Fixes #9