Centralised Login to multiple rails servers

Viewed 22

The situation:

We have a rails application, which runs on 12 different servers (different sets of customers). User credentials are stored in the database of each server. We use Devise for auth.

We have an Android app that, when logging in, you have to select the correct server to connect to.

Requirements:

A centralised login page so users don't need to know which server/url to log in to. This is for the web and android. The user should either:

a) Type their username/email, and be forwarded to the correct server to login.
b) Type their username/email AND password, and be forwarded and logged in to the correct server.

Current Ideas:

  1. Create a NoSQL db table with a list of usernames/emails with the server they need to log in to, the login page can grab the server and forward you on.
  2. Use something like Auth0 to manage user data - however unsure how this would work with our current User credential tables spread across multiple servers.

This is not something I have a huge amount of knowledge on, and looking for criticism of the above ideas/better approaches.

0 Answers
Related