Debarshi's den

Forcing Google to show a mobile OAuth approval page

with 3 comments

I did not find this mentioned anywhere on the Internet. Hopefully someone might find this helpful.

This stupid bug had me confused for the last couple of months. It turns out that the Google-specific btmpl parameter does not work as documented. Neither do they recognize the Nokia N9’s user-agent as a mobile phone browser.

Not unsurprisingly, Android phones work, and so does the iPhone.

Here are the relevant user-agents, in case someone out there needs them.

  • Nokia N9: Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13
  • HTC Wildfire: Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; HTC Wildfire Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
  • iPhone 4S: Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3


It appears as if they are grepping for the names of well-known mobile platforms instead of just looking for “Mobile”. I am surprised because Google does not seem to have an Android branded or iPhone branded page as some people (like Facebook) have.


Written by Debarshi Ray

16 May, 2012 at 14:08

3 Responses

Subscribe to comments with RSS.

  1. It seems that this practise is also used in mobile gmail. There are apps for less popular mobile platforms that change user-agent so Google is happy and let users have pretty mobile gmail instead of crappy one.

    Daniel Gonzalez Diaz

    16 May, 2012 at 18:36

  2. Any plans for making a patch for gnome-3-4/3-2 branches also?

    Bjørn Lie (@iznogood)

    17 May, 2012 at 07:52

    • No. I backported a patch for the Facebook authentication page just in time for 3.4.2, but missed the deadline for Google. In any case GNOME 3.6 will have a lot of UI/UX improvements on the Online Accounts front, so I am not really keen on backporting this relatively small improvement so late in the 3.4.x cycle.

      Debarshi Ray

      29 May, 2012 at 13:52

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: