Simple SSO system like Google Identity Toolkit but without the locked UI? - php

The Google Identity Toolkit is awesome. So clean and easy to set up! Trouble is, it forces you to use its UI, which isn't working for me. Is there anything else out there that will let the visitor click a GMAIL or YAHOO Mail icon to trigger an OpenID (or oAuth2) request, without hijacking the interface?
I've already implemented Facebook Logins in my site, which lets me customize the sign-in button however I want. For example, here's my current sign-in menu (with PHP/AJAX/MySQL site authentication for those who don't want to use their Facebook/etc. account to sign in):
Clicking FACEBOOK triggers the Facebook JS SDK for the login. Simple enough. I just want a GMAIL logo and YAHOO logo below it.
Any suggestions?

If you want to avoid the UI of a high level library, you're going to have to use a lower level library. In particular, you're going to need an OAuth 2 library. There's not that many of them (surprisingly), but your best bet is likely going to be the one authored by google: http://code.google.com/p/google-api-php-client/wiki/OAuth2

If you're looking for a solution that allows you to leverage all of the APIs for the major ID providers, you might want to test out Janrain Engage.
Here's a quick lowdown on our Engage API endpoints (specifically, auth_info), for social authentication:
http://developers.janrain.com/documentation/api/#Engage
You can have complete control over the UI and display just Google and Yahoo.
http://janrain.com/products/engage/ (for marketing-ese)

Related

Google Hangouts in my website as a chat/messaging system

I currently have Google OAuth 2.0 for authentication. Next I want to be able to use google hangouts in my website so users can chat with each other, along with showing their contact list. So basically I want it to look like how it is on gmail but on my website for hangouts. Main reason for doing this, I want my users to be able use hangouts as a mode of communication. Please let me know if this is possible and provide the necessary resources, an example/demo of this working would really be helpful.
Im afraid there's no API at the moment available (nor plans for that) to access the text chat feature of Hangouts.
yes, you can. More information about google hangouts API here https://developers.google.com/+/hangouts/getting-started

Facebook Registration and Login Slim Framework PHP API

I have an api, which has a regular email password login. But I want to add facebook logins.
Do I need an app registered on facebook?
Do I need to force users to register using facebook, or just link their facebook account to their account and use it as a form of auth.
How does this tie into mobile apps? Given I am writing the API, what info does the client provide for a facebook login and what do I need to store?
There is a plethora of info out there and I am not sure where to start. I am writing an API, but I am not sure how much work my API has to do and how much the client just has to deal directly with facebook. Any specific guides tailored more toward what I am doing would be great.
A simple library called HybridAuth available that takes the pain out of building a social login feature.
Here is a very detailed tutorial from Sitepoint.
I am answering this even though this question in 1 year old, because this is visible on google search top 3 links. It might help someone who stumble upon this like I did few months ago.

Is it still possible to use Google OAuth without plus?

I have a working php code which lets users login through Google Api.
The problem is, this code requires users to become Google Plus users.
I use the latest api located at http://code.google.com/p/google-api-php-client/downloads/list and still couldn't find out if I can use the same service for people who do not have and do not want to activate Google "plus".
update: I understand that this might be a 3rd party api question and I also think that this is a question about a popular 3rd party api and this question and it's answers may still help many people out there.
answer of the question: for quick reference, the answer is *Google_Oauth2Service* class
You can use Google OAuth as a mechanism to authenticate users without requiring that those Google users have activated Google+ accounts. See Using OAuth 2.0 for login. This approach relies on requesting the user's identity via the userinfo.profile or userinfo.email OAuth scopes.
You get advanced functionality and social capabilities if you use Google+ Sign-In, and if your users opt for that option, they will be prompted to upgrade their Google account. This approach uses the plus.login OAuth scope, which gets you identity information in addition to other API methods that can be called.
Choosing the approach that works for your app and audience is up to you.
As of june 2015, you have to use the google+ API to set up the sign-in (Other methods were deprecated).
If you want your user to sign-in without a google+ account, you need to specify "profile" instead of "https://www.googleapis.com/auth/plus.login" as the scope as explained here

Logging in to other wesites using Facebook Account

I am developing an advertisement site in PHP, the user can only list there products by logging in using there account in the site. Also i need to have another option for users to login into the website using there Facebook account and hence advertise about their products. How can i implement? Do i need to create any application instance in FB for this? I am looking forward for valuable suggestions.
Create an app.
Look into authentication, and see which method (server-side vs. client-side) fits you.
Once you've implemented that, you can make graph api calls. https://graph.facebook.com/me gives you the user's basic details
Good luck.

Google Contacts Data API and PHP

I'm developing a PHP application to retrieve the list of contacts from a GMail account. I'm looking for a solution which would enable the user of my application to provide the login and password to their Gmail account in my application (as opposed to getting redirected to Google) and then automatically do the retrieval. The retrieval process can be run in PHP or JavaScript (which would then feed the list of contacts back to PHP using Ajax).
Is it possible to do that? Which JavaScript API should I use for that? Can someone point me at the right chapter in Google Contacts Data API documentation?
This is really not advised - google provide OAuth for a reason - so that users won't have to give their credentials to 3'rd parties.
Check out http://code.google.com/apis/accounts/docs/OAuth.html
Speaking only for my self (and all other developers I know), having to hand over my credentials to 3'rd parties is a real no-no.
It would be best to use the Google Contacts Data API using JavaScript for your case.
I haven't tested it myself but it looks nice: http://gmail-lite.sourceforge.net/wordpress/
//edit:
You probably should use: http://code.google.com/apis/contacts/

Categories