My application is currently allowing the user sign_in to his subdomain ie subdomain.domain.com/users/sign_in. I would like users to visit domain.com/users/sign_in.
I am new to Rails and I got a lot of help regarding subdomains from this project on Github: https://github.com/appcasts/saas-timetracker
In routes.rb, I added "devise_for: users" to show the sign_in form on domain.com/users/sign_in, however I cannot authenticate the user in the subdomain because I get an "Invalid email address and password".
Is there a way that users can log in with domain.com and be authenticated and redirected to their correct subdomain?
I tried: A practical guide. Entering a registration area in a subdomain
And I get the column, the "subdomain" does not exist. I also tried the Custom_Failure_app solution, which all the time gave me an error for all the redirect_to paths that I add.
Any help or suggestions would be appreciated.
source
share