Devise OmniAuth and Devise-otp - ruby-on-rails

I am new to rails.
I want to do a google authentication app using Devise gem. (i.e) SignIn with Google after successful login by user and then I have to display otp view page (using Devise-otp gem)
Is it possible to implement those 2 features using Devise Gem in single app ?
If Possible can give me some tutorial links or some steps.
I completed Signin with google after that I don't know how to use Devise-otp to proceed second-step-verification process. so please help me.
I referred below links but it confused
https://github.com/AsteriskLabs/devise_google_authenticator
http://www.techhui.com/profiles/blogs/add-two-factor-authentication-to-your-rails-app-with-devise

You can use active_model_otp gem for this purpose.
Active model otp

Related

Switching from Devise to OmniAuth with Rails 5. Keeping Devise or not?

So I have been using Devise gem for users to sign up with email, but now I want to switch to Twitter login using OmniAuth gem. I'm a bit confused with the transition.
Should I still keep Devise Gem or remove it completely and create a custom User table to store users' personal and Twitter details?
Thank you tons!
No you can use Devise Omniauthable option. check the instructions here. You will not have to separate users in different tables, just follow the instructions to add twitter sign on and add the appropriate fields to your users table(provider and uid)

Central Authentication Service (CAS) with rails

I am developing a web application with ruby on rails. I am trying to link the authentification page of my webapp to a Central Authentication Service (CAS).
So, whenever someone tries to start my webapp , my app should :
Check if the user is already connected to the CAS
1/ if he is already connected, the app will start and he can use its services normally
2/ if the user is not connected to the app, a login page will be displayed, where he has to type his password and login. These password and login will be tested on the CAS, and according to the result of the test will be allowed to start the webapp or not.
This seems a bit complicated to implement. I need help because i am new to ruby on rails.
thanks in advance
use the devise gem,
here is a railscast to show you how railscast example
and here is the gem link
here is a CAS specific gem for devise
hope that helps

how to share fixed data on facebook if used omniauth for authentication

I have used omniauth for authentication of user in rails. i just want to create a button on my site which when clicked should post to logged in users facebook profile a certain fixed data.
i have tried facebook_share gem but unable to specify the predefine text. kindly help me in this
thanks in advance
In place of facebook_share the better way is to use facebook api. link explains all
https://github.com/aayushkhandelwal11/training-assignment/blob/master/facebookshare.txt

How to integrate facebook comments in Rails application?

I've set up a Rails 3.2 application with Devise. I was wondering how I can allow users to comment using Facebook. Can I use facebook connect along with Devise? If I can, is it ok to have 2 methods of authentication on my site?
I've read some tutorials on setting up OAuth with Devise to allow facebook connect, but it's not all that clear to me. Does anyone know a good step-by-step tutorial on how to integrate facebook comments with Devise already set up? Thanks a lot!
You don't need to setup Facebook Connect for comments.
You have to first create a Facebook app, then generate the comments plugin. After, put the Javascript code in your application.html.erb after the body tag (my suggestion is to make a partial). In the end, drop the div with the fb-comments class where you want the comments box to appear.

How to update users facebook profile status from my rails web application

in my rails web application I am implementing Facebook connectivity. I want that whenever user updates his/her status on my site his/her facebook status should also be updated. Is there any working rails application for this?
Please help.Thank you.
Have a look at the Koala gem which acts as a client to the Facebook graph API and does exactly what you need.
fb_graph as well also accomplishes what the koala gem does .
Though to update on a user to user basis you'll need to have some sort of login system in place. In that case I'd look at Devise using omniauth to accomplish this.
I use devise + omniauth for authentication and getting the right access token.
I use Koala for updating + reading information.

Resources