Here is implementation of custom two step login flow. Suitable for Facebook, linkedin etc oAuth process.