NodeBB / NodeBB/nodebb-plugin-sso-oauth2-multiple
New user being created instead of using existing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 14
- Forks
- 9
- Avg merge
- 1m
- Merged PRs (30d)
- 7
Description
Hi there,
I am confused on how to set up the plugin to use an existing user based on their email address.
Currently, as soon as I log in with my own OAuth2 Strategy (which comes with the verified email flag set), it still creates another user:
I thought it would help to enable Use email as username (overrides previous option) in Preferences, but that did not help either. I also checked Automatically confirm emails when email_verified is true'.
I have had a look at the login code and if I am not mistaken it is supposed to do this already, so there seems to be something wrong with it.
https://github.com/NodeBB/nodebb-plugin-sso-oauth2-multiple/blob/43c74140829a6d9141330c3609967c2530f48b70/library.js#L226-L229
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in library.js at lines 226-229 and trace the existing-user lookup during OAuth login. Reproduce the login with an existing email, the verified-email flag, and the listed Preferences options; done means the OAuth login reuses the existing user instead of creating another account.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100