-
-
Notifications
You must be signed in to change notification settings - Fork 833
Fixes authentication when user is registered via module API #10156
Conversation
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
@@ -144,16 +144,13 @@ export class ProxiedModuleApi implements ModuleApi { | |||
* @override | |||
*/ | |||
public async overwriteAccountAuth(accountInfo: AccountAuthInfo): Promise<void> { | |||
dispatcher.dispatch<OverwriteLoginPayload>( | |||
await doSetLoggedIn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this was the only caller which used OverwriteLoginPayload
so it should be cleaned up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, okay, I have removed OverwriteLoginPayload
and it's usages from the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change actually breaks a lot of tests (approximately 10%). It looks not clear to me. It seems that some mocking is not working properly anymore. Is it valid to use Lifecycle
this way? If yes maybe there is some idea or hint how the tests could be fixed? @t3chguy could you please help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the method you are calling was not previously exported - it wasn't a designed use for it to be called like this.
As for the test failures, would need to step through the code to see what is wrong. Not something I'm able to dive into right now unfortunately
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Created another PR that fixes this issue: #10257 |
closing this PR in favor of #10257 |
Type: Defect
Related: https://github.com/matrix-org/matrix-react-sdk-module-api
When user is registered via module API (using ILAG module for example) the following error is received:
This PR provides a fix to resolve this problem.
Checklist
Here's what your changelog entry will look like:
🐛 Bug Fixes