My tech stack includes Angular, .NET, MVC, and VS2015.
One issue I am facing on my website is with social login. After a user signs in, they get redirected from the main window to the login window. However, after a successful login, the user remains on the login page when I want them to return to the main page.
On the main page, there is a script that runs at intervals checking for a login cookie while the user is on the login page. Once the cookie is detected, the user should be redirected to their designated page.
I have attempted to solve this issue by using the $window object to give focus to the user page once they are redirected, but so far, it has not resulted in the desired outcome. The user still remains on the login page.
$document.ready(function () {
$window.focus();
})