-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable the Toolkit to work with Angular 17 SSR #2957
Comments
Thanks for your interest in MGT and for the suggestion! It's something we need to get to and is a big topic because of all the dependencies this requires (Fluent UI Web Components, Lit, etc.). That being said, this is something that will get more and more traction and we should absolutely start investigating. There is no current spike planned and if you are willing to help us, we'd love to explore the options with you! For now we'll put this in our backlog but there is nothing planned in that space. |
okay thanks, So rendering on the server side will not be possible in the next time. Some condition similar like this could already help in your style-helper.ts:
That might be a low hanging fruit to fix something. |
Adding @gavinbarron for visibility. The thing I'm scared of is the amount of |
My initial thinking is that the specific error around setting the globalProvider to the Msal2Provider is likely from our dependency on Yes, there are a lot of document references in our own code too, some of them rightly so, as in mgt-flyout, as they are providing client side layout help. SSR is an emerging area for web components with experimental support starting to be available. We currently use lit who have an experimental library https://lit.dev/docs/ssr/overview/ but it doesn't yet support async component work. Microsoft FAST web component also don't yet have support for SSR microsoft/fast#5182 Then there's the auth piece. AFAIK MSAL does not yet have a good story for proper SSR of SPA AzureAD/microsoft-authentication-library-for-js#5038 (comment) All this to say, as much as I'd love for us to have a great SSR story, we really need for the dependencies upon which we're built to have a great SSR story to enable this. |
I'm going to close this issue in favor of the original SSR issue to avoid having open duplicates |
Proposal: Add functionality for SSR in Angular Apps
Description
Currently any reference to "Providers" from @microsoft/mgt causes an error on the server side that states that "document is not defined"
This happens even when the developer checks if the current execution context is the client (and not the server)
Rationale
Angular SSR becomes more and more important in the community and the Graph Toolkit should support also those kinds of apps.
The text was updated successfully, but these errors were encountered: