Truth uncovered: this login flow has almost nothing to do with OAuth, it is actually much more similar to OpenID. Listen to the StackOverflow podcast episodes from 2008 and 2009.