I think you can use iframe trick, put some iframe on your page to endpoint that gives you protected data(like user info) if you have cookie or returns 302 to visit login page, on load event of iframe you can retry that end point with client side api call, this way sso issue must be solved