Forcing Google to show a mobile OAuth approval page
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.















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
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