signinPopup without callback.html
I am trying to make a commenting system as a SaaS service : the client may have an html file, index.html, in which he want to allow people to leave a comment - the client can do that by referencing my external javascript file which will create a commenting UI out-of-the-box. As part of the commenting UI, there will be a login button so that any people who want to comment can login first - I want to use IdentityServer4 to handle the login. So far I have made it work if I use an extra html file, callback.html, to handle the OIDC callback processing and redirect back to the original html page, index.html. However, forcing the client to setup an extra callback.html file will be too cumbersome for the client - I need a way to handle the OIDC callback processing directly in the commenting javascript referenced by the client, so that the client does not have to do anything else than referencing that javascript. What will be the recommended approach in what I try to achieve ?
I need a way to handle the OIDC callback processing directly in the commenting javascript referenced by the client
From a security standpoint, I don't recommend this. You want that hand-off page to have as little code in it as possible.
Thanks for answer and may I add that I find IdentityServer4 to be an awesome library, however I think that my proposed technical model, embedding a full service within a single javascript reference, is an important technical model because it will easen the use of SaaS. I don't have enough insight into the security ramifications, but it would be great if there was a way for IdentityServer4 to support said technical model to avoid forcing clients to setup extra code to be able to use a SaaS service. I wonder if not the OIDC callback processing could be handled behind the curtains using either AJAX or an IFrame (all setup by the original referenced javascript file so that the client don't have to do anything else than referencing the javascript file).
The protocol is not designed to be performed via ajax.