Popup not getting Closed?
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
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.
I'll have a look when I can.
What platform/browser versions?
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?
I also just tested on Mac OSX with FF, Chrome, and Safari and they're all also working properly.
Any update?
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.
we accept PRs on our docs :)
I have never contributed to a project before but perhaps it's time to figure out how :)
yep -- it's appreciated
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.