I'm working with an ASP.NET application. My page display content (images) from SharePoint Online. Certainly if I want to display something from SharePoint, I must be authenticated first. So I wrote a script to check if user is logged in or not. If not, a window will open and navigate to SharePoint sign in page.
The question is how to close this sign in window after user do the authentication? I've tried the solution here Close window, after redirect but it only works with local site, with login page from different domain (SharePoint Online), it return "Access is denied" error due to Cross Frame scripting prevention.
So any other solution?