How to authenticate migrated users from phpBB?
-
For starters I just wanted to migrate the users from my phpbb forum to nodebb. I wrote a little nodejs script that pulls users from my phpbb database then inserts them into the redis database. The issue I'm having is how should I handle doing the authentication? I stored their phpbb passwords in a field called phpbb_password on each user.
Can I write an authentication plugin to look and see if they have a phpbb_password field and if they do use phpass to check the password?
Even better, can I make it so that the first time they try to login and they have a phpbb_password field can I have it prompt them to enter a new password along with their old password? This way it will just use the built-in passport for logging in.
-
hey @skaughtx0r
If you're writing a migrator, I'd suggest using this for importing into NodeBB:
[nodebb-plugin-import] Import your forum to NBB
Basically NodeBB migration meeting you half way. 1-) export your forum into a file structure which the importer can read, if you're using UBB, i already wrot...
NodeBB Community (community.nodebb.org)
It's been used to import a pretty big forum already (320k posts)
Since phpBB uses MD5 encryption, it won't be compatible with our system. So basically you'll need to do what @bentael does in his system (ie. store random passwords and then email blast the passwords to the user). Alternatively you could just send them all emails telling them to reset their password.
An authentication plugin where it attempts to MD5 the inputted password and compare to the phpbb_password field that you've stored is doable (let me know if you need help there) - but personally I wouldn't recommend it.
Let us know what you end up doing. Good luck!
-
I saw that importer, but I need to take some extra steps when importing. I store race results in some other tables that link directly to the phpbb user id and I need to update these to instead link to the nodebb user id during the migrate.
I was thinking the reset password route would be the way to go, but I haven't been able to get the password reset function to work in nodebb. I installed postfix on my server and when I try to reset the password, it says "Password Reset Sent", but I never actually get an email. Also there's no error messages output in the console when this happens.
EDIT: Looks like my ISP is blocking port 25, so I can't send emails, I'll have to put this virtual machine up on my server.
-
okay good luck! let us know what the URL is when you're ready so we can advertise you
-
OK, it'll be a little while, I'm still working on the theme too.
-
@skaughtx0r Handling the passwords is a pain, and there is no easy way to authenticate NodeBB with MD5, except, like you mentioned, you would write some middleware-plugin that will intercept NodeBB's login, and instead authenticate against your MD5 passwords db, I would highly recommend not doing that, that's just going to be a lot of work in the future, especially that you would need to intercept NodeBB updating the passwords, along with OAuth plugins.. I would just reset the passwords, that's what I did..
The importer will do the users mapping for you, the from the _old_id to the _new_id, if you can export the data correctly, and will generate everything you need, from JSON and CSV structures (you can use Mandrill to send about 12k free emails in one months, I wrote this tool to read a template and blast it), both structures will contains the emails with new passwords, .. at the moment, you're going to have to grep them out of the logs .. but that's easy to do, right?
Also, the importer will generate Redirect Paths, from new to old, which you can use with this other tool that I wrote especially to redirect thousands of old URLs to new ones, but you don't have to use that if you prefer the nginx http map moduleif you decide to write a
phpbb-exporter
which is compatible with nodebb-plugin-import, I could help, this is something I wanted to do anyways, and I think @psychobunny wanted as well.IMPORTANT: the importer is not yet compatible with NodeBB edge, just NodeBB 0.2.0 and you will need to comment out some code in NodeBB's src - I am trying to wait for each major NodeBB release before updating it.
-
@julian deal.
i'm just using this node mandril client
-
Mandrill integration would be cool. The 12k per month is very generous.
Sure beats PostageApp's 100 per month! Perhaps I'll switch myself...
Edit: We totally hijacked the thread... whoops Should really build that "split thread" functionality.
-
Eh, it happens @julian.
-
It's ok, my question got answered
-
I got emails working, is there an easy way to send the password reset emails to every user?
-
easiest bet right now is hacking a for loop through all users and send email maybe
-
heh, all right, I'll hold off on that for now anyway, I have a bunch of other stuff to get done.