I have a perfectly working rails application including devise authentication.
I created a second separated rails application for the public website, which runs as separate heroku application.
The problem is: It should be possible to sign up and sign in to the main application using forms in the public website.
How is it possible to authenticate users using devise through a form in a different application? What's the best approach?
If your applications use different subdomains but are under the same domain, this article might help.
And Chris Oliver took an approach to implement this in Rails 3.1 here
Related
I am building Rails Application which re-directs users to a WordPress Site. All exisiting users are in Rails Database.Now I want to use SSO from Rails App to Wordpress.
I came across this solution but
I am using custom authentication method instead of devise gem as called out in the solution.
Is there any other alternate methods to solve this?
I am building a very simple app using angular js as frontend and rails as backend. When building only using rails, it was simple to use devise gem and work with rails views (erb). But now the scene is entirely different for me. I wish to keep both the codebases in separate repositories and run both servers separately (grunt and rails server). Here are my queries (if somebody could answer)
How to manage authentication ? I tried using angular devise but it was not overriding hostname and port for all requests, I had to do it for all type of requests. Also, devise renders its own views after authentication is complete or if it fails. For sessions#new controller, it never lets me override and does its own work.
Any other recommended approach/ a gist or a tutorial which can guide me to manage sessions between rails/angular js ? I am new to this approach (rails-angular thing)
Thanks alot in advance !
Devise is the best option for authentication.
For Rails backend follow this admin static content
For angular frontend follow this Angular Admin UI
I have recently decided to experiment with Angular/Ionic/Phonegap with a Rails API Web Service as backend, to create my first mobile app.
I am from a Rails background and usually use Devise to handle my user authentication/User object to which I assign Roles using Rolify.
Doing some reading, it seems to me that this is not the same methodology that I would have to follow for a mobile app as seen in this question? What I would ideally like to have, is for users to sign in / up using their Facebook accounts, which would create their User record. My web service will then assign the required roles etc.
So my question:
Should I be using Devise/Rolify/Pundit ?
Is there a better/more efficient way to handle this process using this stack?
Thanks
You can use Devise with the omniauth-facebook gem. There are some nice articles out there on how to implement.
Along with this question you should hopefully be able to work it out.
Any backend auth service should really work fine. We use Devise and have found it to work well with angular and ionic. We recently wrote a tutorial on how to set up Ionic with Devise that you might find useful.
I have an app made with Rails 4. I want to add a blog made with Drupal 7. It hasn't been in production yet so no users are stored. I want the users to be able to comment in Drupal 7 with the same email / password (and ideally sessions) that with Rails 4. From my point of view, maybe the solution may come from setting the table that Devise uses to the one Drupal creates, and then copying the encryption salt of the Drupal installation, or maybe using the same OAuth login for both sites, like Google or Facebook, but I would need specific registration for this app.
I know there is a similiar question: Import Drupal user accounts into Rails without requiring users change their passwords but in my case I the users to work both ways.
Any ideas would be appreciated, thanks.
I would go for a clean solution. Whatever login feature you have in rails ( be it implemented by hand, devise or any other), allow it to login users using a GET request (i.e. Embedding the authentication details in the url). This way, you will be using the Rails application as an API for the blog and you will not have to expose the user credentials.
There is RubyOnRails application with Devise authentication. Is there any smart way to add ruby Cramp framework to that application with devise support?
One devise session for both rails and cramp
I am assuming that you want to run Cramp for something like chat within your application. If you provided more info about what you are trying to accomplish, it would help get you a more appropriate answer. If you're building a chat tool, or some kind of stat logging service, it would probably make more sense to build it outside of Rails and integrate the two through an API. Just a thought.