Your verification code is 0Oo1|lLjirnm5S

SMS support has become commonplace for web applications. The usual set-up procedure is…

  1. User provides their phone number
  2. SMS is sent to phone
  3. User proves they own the phone by inputting data from the SMS.

Paul has previously talked about how we deal with international phone codes in Exceptional, and how you can use this in your own Rails applications. Step 2 is another potential pain point for users. Programmers have a tendency to think “Verification codes? Excellent, we’ll generate a random string of at least 8 characters”. A few calls to Kernel.rand later and voila, you have your user typing in characters that they're reading off their phone. And they get it wrong. Often.

Don’t use random codes! Especially ones using characters that all look so similar. Obviously the code I used in the title is an edge case, but bear in mind it takes only one ambiguous letter to annoy a user. Believe me, a lot of phones suck at displaying our test word:0Oo1|lLjirnm5S

So we use real words, straight from the dictionary. When you register your phone with Exceptional, you’ll get a codeword. Just a random word pulled from the dictionary. Result? No one has entered the wrong codeword yet. It just works.

Pic of SMS from Exceptional  - with code word nerve clearly visible

3 Responses to “Your verification code is 0Oo1|lLjirnm5S”

  1. Robin Blandford Says:

    I hope you've vetted those words?

    "Your Exceptional mobile phone verification code is [ broken | missing | gone | boring | coming | late ]" lol!

    I've seen a regex string somewhere to check for chars that look similar on a mobile screen too.

  2. Eoghan McCabe Says:

    Heh. Good point. :-) The next release has the codeword in inverted commas, so that will help.

  3. John Sutherland Says:

    I'm loving the idea of using a real word as the verification code. You might find Douglas Crockford's base32 useful too:

    http://www.crockford.com/wrmg/base32.html

Sorry, comments are closed for this article.