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

Fix registration after clicking email link #2630

Merged
merged 3 commits into from
Feb 13, 2019
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Feb 13, 2019

We weren't correctly jumping into the appropriate bit of the registration
flow when coming in from an email link.

  • If we have client secret / sessionId, go straight to registration phase
  • Don't reset server URLs when the server type component tells us its
    initial value
  • Confusingly, pass the custom server URL as 'default server URL' to
    the custom server type, as this is what we want the inital section
    to be based on.

Fixes element-hq/element-web#8490

We weren't correctly jumping into the appropriate bit of the registration
flow when coming in from an email link.

 * If we have client secret / sessionId, go straight to registration phase
 * Don't reset server URLs when the server type component tells us its
   initial value
 * Confusingly, pass the custom server URL as 'default server URL' to
   the custom server type, as this is what we want the inital section
   to be based on.

Fixes element-hq/element-web#8490
@dbkr dbkr requested a review from a team February 13, 2019 18:17
@jryans jryans self-assigned this Feb 13, 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.

Looks good overall. 😁 Added a few notes below.

src/components/views/auth/ServerTypeSelector.js Outdated Show resolved Hide resolved
let initialPhase = PHASE_SERVER_DETAILS;
if (
// if we have these two, skip to the good bit
(this.props.clientSecret && this.props.sessionId) ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a note that these can come in from email verification, as a reminder for the future.

@jryans jryans assigned dbkr and unassigned jryans Feb 13, 2019
jryans and others added 2 commits February 13, 2019 19:05
Co-Authored-By: dbkr <dbkr@users.noreply.github.com>
@dbkr dbkr merged commit 0ad9d71 into develop Feb 13, 2019
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