<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>The OAuth / App Anti-Pattern &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2012/04/the-oauth-app-anti-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Thu, 26 Apr 2012 06:28:31 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>The OAuth / App Anti-Pattern &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[The OAuth / App Anti-Pattern]]></title>
		<link>https://shkspr.mobi/blog/2012/04/the-oauth-app-anti-pattern/</link>
					<comments>https://shkspr.mobi/blog/2012/04/the-oauth-app-anti-pattern/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 21 Apr 2012 19:48:58 +0000</pubDate>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5599</guid>

					<description><![CDATA[OAuth was designed to combat an anti-pattern.  Typing your username and password into a third party site is bad idea. A really bad idea. I mean, you may think it&#039;s a bad idea to give your bank details to a Nigerian prince but that&#039;s just peanuts compared to giving away your password to an untrusted site!  So, that&#039;s why we use OAuth. Rather than handing details to a random site, we authenticate…]]></description>
										<content:encoded><![CDATA[<p>OAuth was designed to combat an <a href="http://en.wikipedia.org/wiki/Anti-pattern">anti-pattern</a>.</p>

<p>Typing your username and password into a third party site is bad idea. A <em>really</em> bad idea. I mean, you may think it's a bad idea to give your bank details to a Nigerian prince but that's just peanuts compared to giving away your password to an untrusted site!</p>

<p>So, that's why we use OAuth. Rather than handing details to a random site, we authenticate against a trusted site which then redirects us back with an authentication token.</p>

<p>That's all well and good on the web, but on mobile apps it becomes a little more difficult.</p>

<p>This is the popular mobile game <a href="https://play.google.com/store/apps/details?id=com.imangi.templerun">Temple Run</a>. After dying in the game (as I frequently do!) you can Tweet your score. But, first, you need to connect with Twitter.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/04/Temple-Run-Twitter.jpg" alt="Temple Run Twitter" title="Temple Run Twitter" width="300" height="500" class="aligncenter size-full wp-image-5601"></p>

<p>However, clicking the button, presents this screen:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/04/Temple-Run-Twitter-OAuth.jpg" alt="Temple Run Twitter OAuth" title="Temple Run Twitter OAuth" width="300" height="500" class="aligncenter size-full wp-image-5600">
This is a pop-up within the game. What you see in the screenshot is the totality of what the user sees.</p>

<p>There are now two important questions:</p>

<ol>
    <li>How can the user tell if this is the genuine Twitter site?</li>
    <li>Why is there no indication that the site is served over HTTPS?</li>
</ol>

<p>This is a clear anti-pattern! We're teaching people to give over their usernames and passwords to sites that <em>appear</em> to be genuine - yet offer no way to validate their legitimacy.</p>

<p>We've been trying to educate people to look at the URL bar - to check that they've visited the correct site and that there's some form of SSL verification (commonly a padlock).</p>

<p>I'm not suggesting that Temple Run is doing anything other than pointing to the correct site. Just that they aren't giving the user a chance to verify the authenticity.</p>

<h2 id="how-to-solve-this-problem"><a href="https://shkspr.mobi/blog/2012/04/the-oauth-app-anti-pattern/#how-to-solve-this-problem">How To Solve This Problem</a></h2>

<p>I haven't the foggiest!  Thoughts?</p>

<p>We can't rely on the user having the Twitter app installed and firing via intent (or similar).
Due to the huge variety of phones and Operating Systems, there's no easy way (that I know of) to redirect from a website back to the app.
There needs to be a way to keep everything in-app to keep the user experience.</p>

<p>So, come on then oh great minds of the Internet, how do we fix this?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5599&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/04/the-oauth-app-anti-pattern/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
	</channel>
</rss>
