Hack to enable 2-step verification for Google Accounts in Mauritius

Update: This hack is no longer needed. You can now enable it out of the box on your Google Accounts page.

2-step verification adds an extra layer of security to your Google Account by requiring you to enter an additional code texted to your phone after you login using your regular password. However, this feature is currently not yet officially available for Mauritius users, although it just works fine with this little hack.

Turning on 2-step Verification

  1. Visit your account settings page. (Follow link on Google homepage)
  2. Click “Using 2-step verification” under Personal Settings

  3. Read the guidelines and continue through the setup.
  4. When you are prompted to choose how you’d like to get notified, select “Text Message (SMS) or voice call“.
  5. You will now be prompted to enter your country, but you’ll have figured out by now that there’s no option for Mauritius. And it’s here we have to apply the hack. Copy and paste the following code in your address bar and press enter.

    [sourcecode language="javascript"]javascript:(function(){ t=document.getElementById(‘primary-country’);e=document.createElement(‘option’);e.text = ‘Mauritius’;e.value=’MU’;l=t.options[t.selectedIndex]; try { t.add(e, l); } catch (e) { t.add(e, t.selectedIndex); } t.selectedIndex = 0; })();[/sourcecode]

  6. Enter your mobile number in the text box next to the country drop down list & click send code.
  7. If everything went fine, you should receive a text from +447781470659 or Google with the verification code.
  8. Enter the verification code and click verify. Once verified, click next.
  9. You can choose to add a backup mobile number, if ever you lose your phone or for some reason, you can’t access it.
  10. You can also use backup verification codes to log in your Google Account. It’s recommended you print or write down the codes in a safe place.  If your phones are unavailable, these codes will be the only way to sign in to your account.
  11. Optional, If you choose to add a backup phone. To be able to choose Mauritius again, paste-enter the following code in your address bar. The previous won’t work in this step.

    [sourcecode language="javascript"]javascript:(function(){ t=document.getElementById(‘alternate-country’);e=document.createElement(‘option’);e.text = ‘Mauritius’;e.value=’MU’;l=t.options[t.selectedIndex]; try { t.add(e, l); } catch (e) { t.add(e, t.selectedIndex); } t.selectedIndex = 0; })();[/sourcecode]

  12. You may see an alert that you need to create application specific passwords. Read more here.
  13. Once you click “Turn on 2-step verification“, you will be logged out of all Google services and will need to log in again with your password and verification code (sent to your phone as you log in using your password).
Note: This is just a hack, which may break anytime Google updates their account system. To be in the safe side, always keep a backup of your verification codes.

, , ,