bits about life, coding and stuff
OAuth is a perfect solution for authentication with other web apps. The problem is, it just sucks for native apps.
You know the typical workflow for apps. Open, enter credentials, it works. Now here’s what OAuth looks:
Yes, it quit’s the app, opens Safari, and then restarts the App. Yes, this sucks. But see for yourself
Even worse, some other apps like Echofon like to play the travesty role and ask your two times.
There was a big outcry by some people, especially UX affine ones, when Twitter announced shutting down their http auth, leaving only OAuth. Twitter listened and presented xAuth. It basically hides everything from OAuth, let the user enter his credentials the old way while transparently fetching the token. hen some other people say this is a terrible, horrible, not good, very bad idea…
Facebook’s new Graph API is probably the most known OAuth 2 API. They provide a full package for the iPhone that manages all authorization in the browser, yet in a very user transparent way. Sure, this is a security risk. With some easy hacking and/or javascript injection you can steal the login data. But it’s certainly saver than letting the application store the credentials.
Loren Brichter proposes a solution that integrates deeply with the OS, therefore maximizing security while keeping the “native” experience.
OAuth doesn’t prevent evil folks from shipping Twitter apps that might be trojans, but it does allow us here at the Mother Ship to revoke their ability to talk to the Twitter API. That means less spam/”SEO” tools, and a short time-to-live for applications that are discovered to be malicious. [Alex Payne - API Lead, Twitter, Inc.]
I’ll propose something similar. A optimized, secured landing page that is styled native-ish per device and runs within the native browser, but without showing the user so. So we can provide a good-known-flow
Of course, the web service has to provide some sort of management page where current applications are listed and rights can be revoked. If a application goes wild and messes around with usernames, their token can be blocked. (which only makes sense if there’s a reasonable review in application registering)
There’s some comparison of the different techniques on the oauth wiki native apps page; but no clear winner.