User Duplication Issue with Session Sharing after Data Migration
-
Hi guys! I’ve recently migrated my forum from phpBB to NodeBB, including all users, topics, and posts. Users should be able to access the new NodeBB forum from my website via the session-sharing plugin. I've configured the plugin to accept ID, username, and email in the payload. Users can only access the forum through a redirect from the website as the JWT cookies work correctly (i think):
Here’s the issue: when existing users access the forum, their information and accounts are mismatched, leading to account duplication.
For example, an existing user with the details:
{ id: 204533, username: MyUsernameIsVeryLong, email: [email protected] }When this user signs in and accesses the forum, a new account is created with:
{ uid: 26, username: MyUsernameIsVeryLong 0, (no email) }This results in duplicate accounts while the actual account remains unmapped. If I delete the duplicated account from MongoDB and the NodeBB Admin Panel, and log in again, the same username issue ("MyUsernameIsVeryLong 0") persists, but the email might get mapped to another existing user’s email.
I’m not sure if this problem is related to session sharing or if there's something I need to configure or adjust before migrating the data into NodeBB. Any advice or suggestions would be greatly appreciated! Thank you very much in advance!
-
@Julien-Heng the account sync may be failing because the migrated user's email is unconfirmed? Can you try confirming it via admin panel and seeing whether session sharing can find the user then?
-
Yes, the email is confirmed. if you look at the screenshot, there is the green check in front of the email. But somehow when the user log in, NodeBB ignores and created a new account without email.
-
@Julien-Heng how are you confirming the user email for migrated accounts?
-
I am sorry @julian, it had nothing to do with user email.
As I mentioned, I recently migrated from a phpBB forum to NodeBB while keeping the same website. My website uses WordPress to manage all user accounts, while phpBB forum had all the forum accounts linked to these users. I was supposed to map the WordPress user Ids (wp_id) with the phpBB user ids (phpbb_id) first before importing them into NodeBB which I initially did not do this correctly. However, it is all working nicely now. Thank you so much for your help!