The code sample given for getting a token had multiple problems. The call to checkIfUpdated was incorrect and the code didn't take into account that a DOMException is thrown when trying to read popup.location.href before the redirect happened. Apart from that I added url encoding of the query parameters and some simple sanity checks on the received token and assertion values in order to make the sample a bit more robust. I hope this helps.
The code sample given for getting a token had multiple problems. The call to
checkIfUpdated
was incorrect and the code didn't take into account that aDOMException
is thrown when trying to readpopup.location.href
before the redirect happened. Apart from that I added url encoding of the query parameters and some simple sanity checks on the receivedtoken
andassertion
values in order to make the sample a bit more robust. I hope this helps.