Profile cover photo
Profile photo
Ian Barber
Up in your everything
Up in your everything

Post has attachment
An update to an old favourite where I talked about getting a server side auth code from an Android Google Sign In client. tl;dr Its a lot easier now.
Add a comment...

Post has attachment
Very quick blog post with a note for people upgrading Firebase apps that use Google Sign In on Android.
Add a comment...

Post has attachment

Post has shared content
I just pushed a big update to Web Fundamentals that includes new content, a new section that highlights our shows, a brand new Showcase section that includes case studies of great web experiences, and RSS feeds so you can stay up to date with all the new content.

New Content
+Matt Gaunt published a primer on Security with HTTPS (
+Paul Lewis added a new section on Rendering Performance (

You can now stay up to date with all of our shows, including #Polycasts , #HTTP203 , the Chrome Dev Summit, and Udacity courses at

Curious how we built the Chrome Dev Summit site? The new Showcase section has you covered with deep technical Case Studies.  We also highlight great sites and apps with Spotlights.

RSS Feeds
We've also added RSS feeds so that you can stay up to date all the time. Use your favorite feed reader to subscribe!
Everything -
Shows -
Web Fundamentals -
Showcase -

Web — Web Fundamentals
Web — Web Fundamentals
Add a comment...

Post has shared content
Gerwin has taken a look at some of the nice new options in the Javascript google sign-in APIs.
Google Sign-In 2.0

So I started my investigation in the new Identity functionalities that are apparently meant to take over from Google+ Sign-In.

Disclaimer: There hasn't been an official announcement for them yet and the documentation only appeared yesterday ( so things might still be in flux and change without warning (for example you still get a lot of debugging information in the console). I also haven't looked over all of the docs in detail yet so I might be missing important facts in what I'm writing.

I've started out with some really basic examples to highlight some of the new features here:

1) basic.html
This is just the most simple implementation possible. You only define your client-id, no scopes, no nothing.
Compared to the original sign-in implementation this seems even less code than before, especially since the on-success callback now gets a GoogleUser object with basic profile information (id, name, email, image) in addition to the access token so you don't need extra API calls to retrieve this info.

One nice thing with the new button is that it visibly changes state from "Sign in" to "Signed in". In most cases you will still want to hide the button and/or replace it with a "Sign out" button, but I think it's a nice touch.

One thing to consider is that in this basic configuration the `profile` and `email` scopes are added automatically, and some people might be reluctant to share their email if there is no apparent reason to do so for your app, in which case you would have to fall back to my basic-noprofile.html sample (see below).

2) basic-plus.html
One interesting feature they are introducing with the new sign-in is "context-awareness" of the button. Without any special scopes you get a blue Google Sign-in button. As soon as you add a social scope like it is rendered as a red Google+ Sign-in button instead.
This in my opinion is a huge improvement since having a Google+ Sign-in button everywhere where you only needed basic profile information without the social infos like "friends", didn't really make much sense.
I wonder if they will extend that idea to allow for example for "Connect with YouTube" buttons, but I guess this would get confusing/complicated rather quickly with different scopes being mixed, and you can always design your own custom sign-in button (following the branding guidelines).

3) basic-noprofile.html
As I wrote above `profile` and `email` scopes are automatically added to whatever scopes you define for your sign-in.
To prevent this you can set a fetch_basic_profile parameter to false, but this will result in no name/images being included in the GoogleUser object.
Since in most cases you will still need this information you will have to use an extra API call to retrieve it.
This is easy enough since (like with sign-in 1.0) all JS API client library calls will be automatically authenticated so you can simply use a people.get({userId: 'me'}) to retrieve the information. Not much extra work but I think it would still be nice to be able to "fetch_basic_profile" without the extra email scope.

That's it for now, still trying to wrap my head around how to handle some special cases and server-side hybrid implementations :)

One extra note if you are switching from Google+ Sign-in to Google Sign-in:
If you are using the "BasicProfile" the image URL will have a /s96-c/photo.jpg format and be a 96x96 image by default which you can adjust by changing the s96 part.
Via the Google+ API you get profile images as /photo.jpg?sz=50 as a 50x50 image which you can adjust by changing the ?sz=50 part or just adding another sz parameter to the end which will overwrite the other one like photo.jpg?sz=50&sz=100

#gde #opensourcecode #tutorial #googleplus #identity
Add a comment...

Post has shared content
This is very cool. If you write your Cast receiver app right, you will now be able to treat the remote as a second sender - so be able to pause and play media.

The only real work is using the regular Cast media namespace for messages (rather than a custom one) - which is the right thing to do in any case for the standard controls. You can read more about how that works on DGC:
Google Cast Support for HDMI CEC
We have recently rolled out additional support for HDMI CEC features for Google Cast devices.

You can now use your TV’s remote Play and Pause buttons to control media that you cast to your TV on some applications. You can also use your remote’s Exit button to stop casting an app.

We previously launched the ability for Google Cast devices to change the TV input when you begin casting.

You need to ensure your apps use the Google Cast media namespace for controlling media playback and that the media control commands are supported by the receiver app:

Your TV needs to have HDMI CEC enabled for these features to work. Follow the instructions in our User Help Center and Support Forum:

Note that these features may not work with all Cast enabled apps or all TV’s.

Happy Casting!

#googlecastsdk #googlecast #chromecast #androidtv
Add a comment...

Post has attachment
The new Google Sign In iOS SDK is out, so I've written a quick post on how to use it from Swift. For people who had previously used the Google+ Sign-In SDK, its worth a look - there are some nice new methods and classes which simplify some regular use cases, which I touch on towards the end of the post. 
Google Sign In iOS 1.0.0
Google Sign In iOS 1.0.0
Add a comment...

Post has shared content
It is time to lower the flags to half-mast. One of the great writers of our time has left us. I've been a long time fan of his work and am thankful that his legacy will live on through his literature.
Add a comment...

Post has attachment
Wrote a quick post on service accounts - I've seen a few issues recently where people where having trouble with them, so hopefully will clear up some of the basics here. I've included a couple of example for Drive and Analytics, but tl;dr - Service Accounts are a virtual user and don't represent the user that created them, so you need to go through additional steps to grant them access to data in most cases.
Add a comment...

Post has shared content
While this had been expected for a while, I am sad to say that today we lost a man who was a great artist, a great actor, and an all-around mensch. The world will be poorer without him.
Add a comment...
Wait while more posts are being loaded