Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Don't trample over existing sessions when verifying email addresses #2768

Merged
merged 2 commits into from
Mar 8, 2019

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#6875

Instead of overwriting what we have, we'll load the session we have and try to warn the user that they have verified an address for someone else.

Fixes element-hq/element-web#6875

Instead of overwriting what we have, we'll load the session we have and try to warn the user that they have verified an address for someone else.
@turt2live turt2live force-pushed the travis/verify-email-state branch from 961f155 to 0e16f3a Compare March 8, 2019 00:10
@turt2live turt2live requested a review from a team March 8, 2019 00:10
@jryans jryans self-assigned this Mar 8, 2019
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! 😁 Seems like a good improvement.

src/Lifecycle.js Outdated
@@ -214,6 +225,16 @@ function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) {
});
}

function _getLocalstorageSessionVars() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Perhaps _getLocalStorage... with capital S?

@jryans jryans assigned turt2live and unassigned jryans Mar 8, 2019
@turt2live turt2live merged commit 14b3d55 into develop Mar 8, 2019
@turt2live turt2live deleted the travis/verify-email-state branch March 8, 2019 17:07
dbkr added a commit that referenced this pull request May 14, 2019
Regressed in #2768
where we check for an existing stored account first and restore that
instead if it exist, telling the user. We usually make a guest account
when the user first hits the page though, so this just restored this
guest account.

Don't restore the account if it's just a guest account (which, as per
comment, is not perfect, but is definitely better than the current
behaviour).

Fixes element-hq/element-web#9581
dbkr added a commit that referenced this pull request May 14, 2019
Regressed in #2768
where we check for an existing stored account first and restore that
instead if it exist, telling the user. We usually make a guest account
when the user first hits the page though, so this just restored this
guest account.

Don't restore the account if it's just a guest account (which, as per
comment, is not perfect, but is definitely better than the current
behaviour).

Fixes element-hq/element-web#9581
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants