I've just bought a Samsung Galaxy Tab 2 and tried to login with my google (gmail) account (which has 2 step authentication) and it redirected me to the web login which I completed (with the text message for the code because it's an unrecognized device). It then returns me to the OS login which I try again which then redirects me back to the web login.
So I get stuck in this infinite loop when trying to login. I assume that this is because I've got 2 step authentication enabled. Any idea how to login in the Samsung Galaxy Tab 2 with 2 step authentication?

