1

I am trying to make doorkeeper work with my multitenant application which runs on Apartment Gem. I am trying to figure out a way to load schema for doorkeeper gem to find and authenticate the user.

Any suggestions on how to proceed?

Aniket Rao
  • 758
  • 7
  • 16
  • Do you have doorkeeper working as standalone? Usually, the apartment will take care of migrating schema for new tenant. Can you tell us more where you are facing problems? – fossil Feb 24 '17 at 02:43
  • I am not facing problems as such.. just was trying to see whats the best way to get this working. So I am passing the subdomain or the tenant name identifier as a header in the request to generate a token. Using this header I configured Doorkeeper to switch the tenant and then using the user params i validate and authenticate the user. Thats the best I could think of.. You have any better approach that you can suggest? – Aniket Rao Feb 24 '17 at 03:57
  • I suppose you are using the `doorkeeper` as provider. I don't see any problem with this approach. Personally I would prefer to use the subdomain elevator in `apartment` gem to switch between tenants. I have been doing it with `devise_token_auth` gem in a multitenant application. I am exploring the possibility of switching to microservices architecture and use `doorkeeper` for authentication. – fossil Feb 24 '17 at 05:30
  • Agree! I use the headers for API calls and elevator for the standard rails app. Also could you keep me posted on the microservices architecture that you are planning? Just curious.. – Aniket Rao Feb 24 '17 at 08:08
  • Probably we can open a chatroom and discuss. You can create one, or I will create one. – fossil Feb 25 '17 at 00:41
  • Thats a good idea. You create one and ping me. – Aniket Rao Feb 25 '17 at 04:29
  • I have created a chat room http://chat.stackoverflow.com/rooms/info/136588/microservices-and-ror?tab=general – fossil Feb 25 '17 at 05:15

0 Answers0