Modal social auth using window.open and setInterval
The social authorization without page reloading is a modern web common problem. Many libraries are resolving backend problems with social auth like Django Social Auth (python/django) or HybridAuth (php/symfony) but no one of them does frontend code. The code below is my simple AngularJS Solution and You can adapt it for any framework even Vanilla.
After that just attach this code to any social auth button like