-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate users created in NodeBB #76
Comments
Are all the duplicate accounts created at the same time? Can you reproduce in a vanilla install of NodeBB+session sharing? |
@julianlam Thanks for your quick reply! The timestamps are slightly different — see below (I've omitted everything from the objects which was exactly the same between the two profiles):
I'll try and replicate in a vanilla install of NodeBB+session sharing. |
I managed to replicate the error locally with the following steps:
|
@danstaak That's really weird, as the session sharing token isn't susceptible to replay (well, only in the sense, that using the same token logs you in instead of registering a new user). Are you stopping and refreshing in quick succession? Definitely doesn't seem right. Hopefully I can reproduce. |
What is the base name in the session-sharing plugin settings? Check that base name's set in the database, e.g. |
@julianlam It is a strange one!
I was stopping and starting it quite quickly
The field in the plugin settings is blank/empty. Should this be set to something? |
If the field is empty, then the default is In mongo, that'd be |
NodeBB is running off of
I get the following:
But I'm not sure if that's the right query? |
I've also been able to replicate the problem in more of a 'real-life' user scenario, rather than a developer really trying to break it as described above. Here's how:
|
Hey @julianlam, Do you have any ideas on how I might be able to resolve this? |
Not at present, because I am unable to reproduce it in any meaningful manner. The only way this would happen is if the initial request comes and creates a user, and then before the user is properly created, another request (from the same user) comes in and kickstarts the user creation process again. I could add a sort of "in-process" cache and maybe handle repeat requests... |
FYI: I've seen this in our system too but was never able to replicate it and was very intermittent. |
Hello, we run a forum at https://forums.j-novel.club/ that uses this plugin for session sharing with the main site. After our upgrade to NodeBB 2.0.0 (from a version a few behind) we are now experiencing this issue, and it is happening pretty often. Duplicate users are being created despite the session token explicitly specifying their forum account ID, username, and email for an existing account. |
I'm experiencing an intermittent issue with this plugin where duplicate users are being created in NodeBB.
I have seen an instance where a user had 4/5 duplicate profiles created.
Sometimes the usernames are exactly the same, sometimes they are appended with '0'
I have a Node.js web app running for 'frontend' logic, routes view etc. I am using a Node.js Proxy (http-proxy-middleware) to get the forum to show on the same domain as the 'frontend webapp'.
A user has a profile created on the frontend of the website, with a single-sign-on cookie created and sent to the user (cookie contains their profile information).
Code example of creating the SSO cookie:
I've looked at the payload for the duplicate user entries and they are exactly the same (bar uid, joindate and lastonline).
Out of the last 12 signups, 1 of them is a duplicate - so it's not something that is happening all the time.
Possibly related to NodeBB/NodeBB#6048
The text was updated successfully, but these errors were encountered: