3

I have a multi-tenant app and each tenant (i.e. account holder) will want to configure his/her own api integration via oauth. I'd like to use omniauth, but it seems like the consumer key and secret need to be passed into the builder module during initialization.

Is there a way to set up omniauth so that my tenants can submit their key, secret, and uri -- without restarting and initializing rails?

Thanks!

Nathan
  • 7,627
  • 11
  • 46
  • 80

1 Answers1

4

Here you can go directly to the omniauth gem wiki:

https://github.com/intridea/omniauth/wiki/Dynamic-Providers

https://github.com/intridea/omniauth/wiki/Setup-Phase

But if you are looking for a good example just look this:

Use omniauth-facebook when app id and app secret are different for each request?

Regards

Ivan

Community
  • 1
  • 1
Ivangrx
  • 445
  • 3
  • 11