I am working on a mobile app that will hit some Google APIs, authenticating using OAuth2.
It's working pretty well but when I navigate to the approval Uri, Google is returning what looks like a full blown desktop app approval page. It doesn't look too bad but I'd prefer to get the stripped down mobile version that you could ask Google's OAuth 1 to display.
(from http://code.google.com/apis/accounts/docs/OAuth_ref.html)
btmpl
(optional) Forces a mobile version of the approval page. The only accepted value is "mobile". This is a Google-specific parameter.
I've tried adding it to the OAuth2 approval Uri but no joy. So if I'm using the Google installed application auth flow, are there any options for indicating that the request is coming from a small screen device?
The oauth endpoint I am using:
https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=http://localhost&scope=https://www.googleapis.com/auth/userinfo.profile&client_id=XXXXXXX.apps.googleusercontent.com
The OAuth 2.0 URL that you are referring to already has a mobile-friendly version available. However, unlike the OAuth 1.0 URL, there is no URL parameter to force it, instead it uses user-agent detection to display the appropriate version depending on the browser. At least it works fine on my Android device (I haven't tried with any other devices though).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With