Skip to content

Issue/5042 duplicate logins - #5155

Merged
kurzee merged 2 commits into
developfrom
issue/5042-duplicate-logins
Apr 19, 2016
Merged

kurzee merged 2 commits into
developfrom
issue/5042-duplicate-logins

Conversation

@kurzee

@kurzee kurzee commented Apr 18, 2016

Copy link
Copy Markdown
Contributor

Fixes #5042

This resolves an issue that pops every now and then in which a separate issue may allow a user to authenticate with a WordPress.com account while the user is currently authenticated with another account. Upon login, the typical handling of AccountService does not replace the current default account and instead just adds a new one.

To test:

  1. If needed, sign in to a WordPress.com account.
  2. On the "My Sites" tab hit the + button and select "Add self-hosted site".
  3. Instead of self-hosted credentials, enter a WordPress.com username and password different from the account that is currently authenticated.
  4. For the site address, enter the primary site for new account, such as "username.wordpress.com".
  5. Upon login, the newly entered account will be the only account and sites listed under the My Sites and Me tabs.

To reproduce the original issue, repeat steps above on the branch develop.

Needs review: @aerych

@kurzee kurzee added the NUX label Apr 18, 2016
@kurzee kurzee added this to the 6.2 milestone Apr 18, 2016
@kurzee

kurzee commented Apr 18, 2016

Copy link
Copy Markdown
Contributor Author

@aerych quick note based on the last visit of this issue, I'm not sold on placing the fix for this within AccountServiceFacade and setDefaultWordPressComAccount:.

However, AccountService itself tries to remain stateless with managing the default account, as does SigninWPComSyncHandler with its use of the facade. If we want to keep the logic out of the facade, I would probably suggest we don't use a facade altogether.

@aerych

aerych commented Apr 19, 2016 •

Copy link
Copy Markdown
Contributor

Hiya @kurzee

I took the branch for a spin and I couldn't create a dup account after the patch. Nice :)
As far as the facade being responsible for the work, I don't really have any better ideas so lets just roll with it.

We chatted about how this change could potentially be problematic if there is already an existing wpcom account in the app and I've opened #5166 to address that situation.

:shipit: !

@kurzee kurzee modified the milestones: 6.3, 6.2 Apr 19, 2016
@kurzee
kurzee merged commit 7094df5 into develop Apr 19, 2016
@kurzee

kurzee commented Apr 19, 2016

Copy link
Copy Markdown
Contributor Author

Thanks @aerych!

@kurzee
kurzee deleted the issue/5042-duplicate-logins branch April 19, 2016 21:29
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.

NUX: Duplicate log in bug

2 participants