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.