discourse/discourse — pull request #276 by jessepollak (2013-02-27 01:39:25+00:00)
Title: Adds the ability to log in to Discourse using your mobile phone

This pull request is a long shot, but I figured I'd make it anyways.

The basic gist of it is simple: right now, when you decide you want to join a discourse forum, you have a few options for authentication:

1. You can create another username and password combination. Insecure, a hassle to remember, etc, etc.
2. You can authenticate with a social provider (Facebook, Twitter). Privacy concerns, insecure because you're putting all your eggs in one basket.
3. You can authenticate with an OpenID provider. Once again, all your eggs in one basket.

This pull request *provides the option* for users to create an account, which would allow them to log in with their mobile phone -- meaning no username/password combination and 2-factor authentication (secure + convenient).

It does this using [Clef](https://clef.io). When a user clicks 'Log in with Your Phone,' they open the Clef app, scan the QR and are instantly authenticated (it's just a standard OAuth handshake after the user's identity is confirmed by the app and the browser is redirected).

Here are some images of the implementation:

the login page:
![login screen](http://cl.ly/image/1J372R47260Z/Screen%20Shot%202013-02-26%20at%205.35.00%20PM.png)

the Clef OAuth redirect page (you scan it with the app)
![scan screen](http://f.cl.ly/items/0D0V281q3t1E0m1F071x/Screen%20Shot%202013-02-26%20at%205.35.36%20PM.png)

logged in:
![logged in](http://cl.ly/image/3L0m1z282I3Y/Screen%20Shot%202013-02-26%20at%205.36.12%20PM.png)

Providing users the choice to use a more secure, convenient authentication method is a great way to keep Discourse on the cutting edge of technology.

*full disclosure: I'm one of the co-founders of Clef. If this doesn't get pulled into the master branch of Disclosure, we will still maintain a branch (and hopefully in the near future a plugin, once those get sorted out), that allows Discourse implementers to provide Clef as an authentication method.*