I'm trying to make my app use Google OpenID identifier. It should be exactly Google OpenID since I'll be using Google Chrome Web Store. I did some research but found no examples here.
The application uses Rails 3.2.
So is there any good example of how to accomplish that? Which gem should I use?
I would take a look at OmniAuth, more specifically on its OpenID strategy.
Related
I'm looking to integrate Gmail into my rails project. The gmail will basically let the user authenticate with their gmail account so they can view, create, and reply to emails from their gmail account.
Is there any major gems that makes this easier than going through the gmail documentation from google ?
I am not sure about gem because I am not from ruby background. But I can help you with the way to proceed further with gmail authentication. Gmail provided the OAuth integration which will basically authenticate your app's user on behalf of you.
useful link: https://developers.google.com/gmail/api/auth/about-auth
once you get this concept then you can move ahead with more specific question like ruby gem/sdk to integrate gmail OAuth with your application.
Thanks, hope this helps !
Going through the documentation is always a good idea even if you can handle it all with gem, understanding what you are doing is helpful and it makes fixing any bugs far easier.
However to answer your question OmniAuth Google OAuth2 should cover your needs, you will also need to read some documentation though.
I'm using thephpleague oauth client library and everything works fine except for Google authentication. It seems I have to enable my domain somewhere to be able to use Google apps.
https://support.google.com/a/answer/33419?hl=en
This was not helpful indeed as I don't understand what I have to do. Am I obligated to pay for having a working OAuth connection with Google? I don't have a company, I don't need the apps, cloud or any other thing then a working API.
EDIT: to be clear I already wrote my libraries for OAuth and it's all working, it's Google that needs me to do something on domain level.
You don't have to pay. First of all you need to create a project in the Google Developers Console. Then get your credentials. I don't know which API you are going to access. Have a look at this.
https://developers.google.com/identity/protocols/OAuth2?csw=1
Additional - This site was very helpful for using the Google Calendar API
http://www.daimto.com/accessing-google-calendar-with-php-oauth2/#Conclusion
Hope you find what you are looking for.
I'm trying to add Google Apps authentication to my Rails (3) app using Devise (1.2.1). Thing is, I can't find anything that helpful on the interwebs other than the small mention in the devise wiki.
Question is, is this possible, and are there any examples out there I can check out?
Devise is to make your web application authenticate users. If you wanт users to login into your app with Google ID then look into OpenID. If you want to connect to Google services you need to implement Oauth client
I've tried a couple of ways (http://emmense.com/php-twitter/ and http://www.webmaster-source.com/2009/04/05/post-to-twitter-from-a-php-script/) to post updates to my twitter account but I am getting the response:
Basic authentication is not supported
I had a look at the twitter website and they said something about the new OAuth for authentication. Is this why my code isn't working?
Does anyone know of some PHP code that works?
This is correct. They recently adopted OAuth as their sole login platform for 3rd party apps as a security precaution.
Check out their developer area for examples:
http://apiwiki.twitter.com/w/page/22554657/OAuth-Examples
Basic auth is deprecated now. Check out this library https://github.com/abraham/twitteroauth for using OAuth in your application
It took me several hours to create this PHP script but it is working. Just make sure that your hosting company supports cURL. If you don't need the geo features you can cut them out.
I'm currently using Authlogic to handle all user accounts, but our company has switched over to Google apps and I would much rather use that same authentication for all users.
My question is - how?
I know I'll need the ruby-openid gem but I have yet to integrate authentication with a 3rd party. Any recent examples or tutorials out there to help guide the way?
Thanks!
There is a good resource here that I've used to get this working in the past.
This does what you are looking for: authlogic_openid_selector_example. It isn't a tutorial but you can have a look at the code.
Seth Ladd, a Google developer advocates, has a blog post on how to authenticate using a google account in a rails 3 appl. You may need to change the example depending on how google apps is configured in your company.
Just a thought -- RPX has the ability to do logins from google, and you could use the Authlogic RPX plugin