Replies: 1 comment 5 replies
-
@TimDol64 : I'm going to move this one to a discussion, don't think this is a library issue |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Category
Describe the bug
When I run my app configured to use PnP Core in an iframe, instead of the app an error message 'login.microsoftonline.com refused to connect' is displayed.
Steps to reproduce
Expected behavior
I expect to be able to use PnP Core in an iframe.
Environment details (development & target environment)
Additional context
My scenario is to have a SharePoint-hosted add-in, where I have a SharePoint page with an iframe to host my Blazor server app.
I started with a Blazor WASM app based on the Demo.Blazor project, but I am using DevExpress controls for the UI and Aspose Words to create Word documents, so opening the app was very slow. Also, I want to keep application id and client secret hidden from users, so I want to move to Blazor Server. I tried to configure PnP Core based on the Demo.ASPNetCode project, and it's working stand alone, but not in an iframe (be it on a SharePoint page or a simple static html file).
I expect the issue is similar to what is described here:
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/425761/my-iframe-displays-login-microsoftonline-com-refused-to-connect---but-only-sometimes
Maybe the response is also relevant in this case: 'It seems that the OAuth 2.0 acces tokens expire and are renewed in the background but this won't apply to the iframe so attempts to redirect fail as we are no longer logged in. We reworked our code so the iframe uses html5 window.parent.postMessage, rather than attempting to redirect to a D365 webresource.'
I am new to both .NET Core and PnP Core, so all the configuration options op PnP Core are overwhelming. Knowing that I had a working scenario based on Blazor WASM: I am not stuck to a particular configuration option. My goal is to have a custom action in SharePoint document libraries, that navigates to a page where my app is running. After filling out an EditForm, I create a document, upload it to the document library where we started, and open the document in Office online. I had it working for WASM, so I am hoping that the same functionality can be achieved with Blazor Server.
Beta Was this translation helpful? Give feedback.
All reactions