Migrating Wordpress legacy app to RoR with Devise. Password hash - ruby-on-rails

I have a database with hundreds of users on an old Wordpress application that I want to migrate to a new RoR application. I am stuck with the passwords. Wordpress has a different encryption than Devise. Its pattern starts with "$P$".
How can I do to create a custom encryptor/digest for my Devise User model to authenticate the old passwords?

Related

How to create a user authentication using rails as backend and ember as frontend

I'm working on eCommerce for my internship project. But I don't know how to create the user authentication using rails and ember
First I assume the following things:
You are using ember to develop your frontend and will consume APIs from the backend.
You are using rails to create the necessary API.
If you want to authenticate users before using your API, check out the doorkeeper and devise gem. Devise takes care of things like storing your user details in the database, resetting the password, etc. The Doorkeeper gem is used to provide authentication and authorization to APIs.
Doorkeeper Link: https://github.com/doorkeeper-gem/doorkeeper
Devise Link: https://github.com/heartcombo/devise

Using Rails with backend server

I'm new to developing Ruby On Rails but have started creating a website for a mobile application that my friends are making. They are storing all of the data (Usernames, photos, posts...) on firebase (firebase.com) so we can all access it.
In broad terms I'm trying to figure out how to implement a lot of this with Ruby On Rails. Looking at most tutorials for rails, it seems like they assume the website has its own database. For instance when a user signs in, I use the user model to save the name, email and password. However this saves it to the rails database and not to firebase where all of the current usernames and passwords are stored. Should I ignore the standard rails method for user authentication and just sign the user into firebase or should I save this data to the rails database. If so, how to I keep that database in sync with firebase?

Can I transfer Devise users from one database to another?

I rebuilt my application from scratch, and in that process, I changed the database from MongoDB to PostgreSQL. I've got existing users who signed up via Devise on the MongoDB database and would like to transfer them to the PostgreSQL database, which is also using Devise.
Is this possible, and if so, how? From a preliminary test of creating users with the same email and password in each version of the application, the encrypted_password is different.

Use the same users with Rails (Devise) and Drupal 7

I have an app made with Rails 4. I want to add a blog made with Drupal 7. It hasn't been in production yet so no users are stored. I want the users to be able to comment in Drupal 7 with the same email / password (and ideally sessions) that with Rails 4. From my point of view, maybe the solution may come from setting the table that Devise uses to the one Drupal creates, and then copying the encryption salt of the Drupal installation, or maybe using the same OAuth login for both sites, like Google or Facebook, but I would need specific registration for this app.
I know there is a similiar question: Import Drupal user accounts into Rails without requiring users change their passwords but in my case I the users to work both ways.
Any ideas would be appreciated, thanks.
I would go for a clean solution. Whatever login feature you have in rails ( be it implemented by hand, devise or any other), allow it to login users using a GET request (i.e. Embedding the authentication details in the url). This way, you will be using the Rails application as an API for the blog and you will not have to expose the user credentials.

Import Drupal user accounts into Rails without requiring users change their passwords

I would like to import a series of Drupal user accounts into a new Rails project. I am using Devise for the user authentication in Rails.
I would like to be able to import the encrypted passwords from Drupal into rails so that users have a seamless experience when the site is migrated over.
Any ideas on how to do this?
it seems that drupal stores the passwords encrypted with md5, so if in your rails application you'll check the md5 computed on the user input against the encrypted password stored in drupal, then you'll get the match

Resources