oidc-client-js icon indicating copy to clipboard operation
oidc-client-js copied to clipboard

Popup not getting Closed?

Open chrissena opened this issue 10 years ago • 11 comments

I also seem to be having a similar problem to #72 and #51 (those issues were closed but couldn't find an actual solution). When I start signinpopup I am able to authenticate with IdentityServer just fine and reach my popupcallback.html but then just hangs.

PopupWindow.ctor oidc-client.min.js:1 popup successfully created oidc-client.min.js:1 got navigator window handle oidc-client.min.js:1 OidcClient.createSigninRequest oidc-client.min.js:1 MetadataService.getAuthorizationEndpoint oidc-client.min.js:1 MetadataService.getMetadataProperty authorization_endpoint oidc-client.min.js:1 MetadataService.getMetadata oidc-client.min.js:1 getting metadata from https:/*****/.well-known/openid-configuration oidc-client.min.js:1 JsonService.getJson https://**_****/.well-known/openid-configuration (18x) oidc-client.min.js:1 PopupWindow._checkForPopupClosed

looking at the console log for the popup gives... Log.js:55 monitorSession is configured, setting up session monitor Log.js:55 UserManager.getUser Log.js:55 _loadUser Log.js:55 WebStorageStateStore.get user:undefined:undefined Log.js:55 UserManager.signinPopupCallback Log.js:55 _signinCallback Log.js:55 PopupNavigator.callback Log.js:55 PopupWindow.notifyOpener Log.js:55 posting url message to opener Log.js:55 no user storageString Log.js:55 user not found in storage

Not sure what to do next

chrissena avatar Oct 26 '16 00:10 chrissena

Just checked and there seems to be an issue with the latest version. Works fine in 1.1.0 so i'm using that for now. Thanks for such a great tool.

chrissena avatar Oct 26 '16 00:10 chrissena

I'll have a look when I can.

brockallen avatar Nov 02 '16 12:11 brockallen

What platform/browser versions?

brockallen avatar Nov 12 '16 22:11 brockallen

I just tested this on Windows 10 with Brave, FF, Chrome, IE 11, Edge, and Safari and all seem to be working for me. I need some more help from you to help track this down. Perhaps you're running in IE/Edge and have security issues with the zones?

brockallen avatar Nov 13 '16 16:11 brockallen

I also just tested on Mac OSX with FF, Chrome, and Safari and they're all also working properly.

brockallen avatar Nov 13 '16 16:11 brockallen

Any update?

brockallen avatar Nov 17 '16 13:11 brockallen

I had some problems with this as well. In my case I missed the part in the walkthrough about putting the signinPopupCallback() in the popup.html file. I don't know if this will help anyone else, but check that the body of your popup looks like this:

<body>
    <script src="[your_path_here]/oidc-client.js"></script>
    <script>
        new UserManager().signinPopupCallback();
    </script>
</body>

If this is the problem others are having as well, perhaps the popup.html snippet here could be updated to show the finished popup.html file to minimize confusion.

NovacDK avatar Nov 30 '16 22:11 NovacDK

we accept PRs on our docs :)

brockallen avatar Nov 30 '16 22:11 brockallen

I have never contributed to a project before but perhaps it's time to figure out how :)

NovacDK avatar Nov 30 '16 22:11 NovacDK

yep -- it's appreciated

brockallen avatar Nov 30 '16 22:11 brockallen

Sorry for not getting back sooner. I have since had a look at this with the latest version and discovered that the popup.html was actually pointing to the older version. This explains why the popup was not closing when the code in the main app was pointing to the newer version. Thanks very much for the help, turns out it was a silly mistake.

chrissena avatar Dec 05 '16 18:12 chrissena