Hi Developer Trailblazers!
Three questions:
1) When someone logs in as an Experience user it is logged in the Setup Audit Trail. Is there a way to have an audience that can detect that an "impersonation" is being used? I would like an Experience page to know that a "Log in as" has been used to add some different content from when a person logs in with username and pw.
2) We are turning off the Header in the community this gets rid of the Profile dropdown including logout. I don't see a way to show the User Profile component other than in the header. Is it possible?
3) Again with Log in to Experience as user, to log out I have tried to create a component with a Logout button, but it is not working to return the user to standard SF page? Could some one help with this?
, but that wasn't working.
I also tried the code below, which does log out of the community, but doesn't navigate back to Salesforce "agent view"
async logout() {
// Logout
console.log('about to get url...');
const logoutUrl = await getLogoutUrl();
console.log('url: ' + logoutUrl);
await fetch(logoutUrl);
console.log('about to navigate...');
// Login page (or could navigate to some other URL)
this[NavigationMixin.Navigate]({
type: 'standard__webPage',
attributes: { url: 'https://workforcesoftware--staging.sandbox.lightning.force.com/' }
});
}