Closed reinvanleirsberghe closed 2 years ago
Hi @reinvanleirsberghe
You can bring profile settings from the server by extending LayoutService context, here is the doc that provides an example. This would require some .NET coding :) https://jss.sitecore.com/docs/techniques/extending-layout-service/layoutservice-extending-context#extending-context-data-returned-by-the-layout-service
Here's an example of using GraphQL to accomplish this as well: https://github.com/erzr/JssAuthenticationSSC
Creating a JS function for components to optionally use that would wrap the layout service response with user data would be a nice enhancement to the current behavior. I've added the appropriate label.
When the current user is logged in, the domain and user are included in the LS Context. Can this be closed?
This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.
Using the docs on https://jss.sitecore.com/docs/techniques/authentication/sitecore-auth I have managed to login on my angular app.
Now I want to get my profile settings. How can you get the current authenticated userId? The only thing that is set is the cookie with a value, but I can't do anything with this value...
Thanks in advance!