Auth (so username) is not in sessionProps

Im trying to get the username in my module. Ive used session props before so i can call them with.
this.props.store.view.page.sessionProps?.read(‘locale’) works.
But auth does not seem to be in here… Any place else i can find the username of the logged in user?

Are you testing with a real client? Perspective auth doesn’t work in the designer.

yes i have a label with the username showing above my component and that one is working.
but my module cant seem to get the session prop from inside the javascript

ah i found it
this.props.store.view.page.parent.auth.webAuthStatus.user.userName

1 Like