I am building a custom widget that recognizes the logged in user so this can be applied to the UI. My goal is for the application to recognize the current logged in user and display information on the tables and pages that pertains to the particular user. So far I was able to create a custom widget that displays the username of the logged in user. Any one have any experience with this and can help develop this. This would be very useful for Esri experience builder users.
So far this is the code for the custom widget that displays the current user. This is the widget.tsx file.