Tuesday, February 26, 2013

[Gd] Introducing Google+ Sign-In for your Drive Apps

| More

Google Apps Developer Blog: Introducing Google+ Sign-In for your Drive Apps

What does the new Google+ Sign-In mean for your Drive app, and why should you use it?

Google+ Sign-In is not just about Google+

All APIs can be authorized using the “Sign in with Google” button, including the Drive API. To authorize additional scopes, just pass them in the markup for the “Sign in with Google” button like we’ve done in this example.


<span class="g-signin"
data-scope="https://www.googleapis.com/auth/drive.file">

Ready-made button to allow users to connect with Google

The “Sign in with Google” button can cater to whatever kind of application you create: web, client, or mobile. Now you can choose the authorization flow you like and get a token using the OAuth 2.0 client-side flow or server flow. There are loads of features, and the button is highly customizable.

I’ve saved my favorite feature until the end: when the user authorizes an application on the web, the mobile version of the app can be installed over the air onto their mobile device. Just add your Android package name when you create the button like in this second example, and your app will be automagically installed.


<span class="g-signin"
data-apppackagename="org.aliafshar.android.driveapp">

I know many of your Drive apps have mobile and web components, so this should be really useful for you. This helps you provide your users with a beautiful and seamless experience on all of their devices.

All-in-all, we think you’ll find these features useful and recommend that you use the Google+ Sign-In as the preferred way to authorize a user with the Google Drive API from inside a user interface. Check out how to get started with Google+ Sign-In in the language of your choice.

Ali Afshar profile | twitter

Tech Lead, Google Drive Developer Relations. As an eternal open source advocate, he contributes to a number of open source applications, and is the author of the PIDA Python IDE. Once an intensive care physician, he has a special interest in all aspects of technology for healthcare

URL: http://googleappsdeveloper.blogspot.com/2013/02/introducing-google-sign-in-for-your.html

No comments: