Skip to content
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

Avoid creating two devices on registration #1305

Merged
merged 3 commits into from
Apr 7, 2020

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Apr 6, 2020

Ignore poll requests after a UIA session has finished. Sometimes
the app calls poll() even after the registration has succeeded
which causes the API call to happen again which, in the case of
registration, creates a phantom device.

Fixes element-hq/element-web#13040

Ignore poll requests after a UIA session has finished. Sometimes
the app calls poll() even after the registration has succeeded
which causes the API call to happen again which, in the case of
registration, creates a phantom device.

Fixes element-hq/element-web#13040
@dbkr dbkr requested a review from a team April 6, 2020 18:47
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, just one question

@@ -318,6 +320,8 @@ InteractiveAuth.prototype = {
try {
const result = await this._requestCallback(auth, background);
this._resolveFunc(result);
this._resolveFunc = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do the same when calling _rejectFunc below on line 387?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, probably

@dbkr dbkr merged commit 66417e6 into develop Apr 7, 2020
@t3chguy t3chguy deleted the dbkr/uia_ignore_poll_after_success branch May 10, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Registration creates two sessions even without email
3 participants