samedi 11 avril 2015

Multi-Tenant Token Authentication of Rails API

I'm building an Ember SPA with a Rails API backend, however, I'm struggling with how to implement multi-tenancy when using token authentication with Devise. I am using the acts_as_tenant gem for a shared database, shared schema setup. Ideally, I'd have a default landing page with a link to the login page. Upon entering login credentials (email and password), the app redirects the user to the correct subdomain for his/her tenant.


There are many examples on SO using sessions, however, I haven't seen an answer combining multi-tenancy, token auth, and an API. Can someone help me connect the dots on implementing this?





Aucun commentaire:

Enregistrer un commentaire