Skip to content

Link Existing Account not always working correctly? #153

@BrutalBirdie

Description

@BrutalBirdie

Details

  • plugin version: 1.5.2
  • NodeBB version: 4.10.1
  • deployment: Cloudron
  • DB: MongoDB

Issue description

Linking an existing account when OAuth login is used is not always working correctly

Steps to reproduce

OAuth configuration:

Image

Create a user manually and verify the mail.
Login with OAuth where the same mail and even username is used.
A new user is created with $USERNAME 0 appended.

Image

Log in with OAuth, same username and mail.
A second user is created:

Image

Also tested with a non admin user with the same issue.


I have managed to get it working when enabling the following two options on another instance.

  • Use email as username (supercedes previous option).
  • Automatically confirm emails when email_verified is true.
Image

But there was something else fishy.
When I first entered my credentials in the OAuth provider I got a white page on the OAuth provider , so maybe an upstream issue there.
But when I revisited NodeBB with a valid OAuth session cached and pressed login with OAuth again, I was correctly authed as the user and no second user was created.

Another thing I noticed.
The now 'linked' user has no details in his account that he has an OAuth account linked.

Image This could be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions