Hi,
I can log in into my portal, but I cannot log out.
The log in starts after click a bottom.
This is my code (from https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#methods-summar...😞
// load the Portal and PortalQueryParams modules
require(["esri/portal/Portal",
"esri/portal/PortalQueryParams"
], function(Portal, PortalQueryParams) {
portal = new Portal();
// Setting authMode to immediate signs the user in once loaded
portal.authMode = "immediate";
// Once portal is loaded, user signed in
portal.load().then(function() {
console.log(portal);
// Create query parameters for the portal search
// This object autocasts as new PortalQueryParams()
let queryParams = {
query: "owner:" + portal.user.username,
sortField: "numViews",
sortOrder: "desc",
num: 20
};
// Query the items based on the queryParams created from portal above
portal.queryItems(queryParams).then(createGallery);
});
});
Then the login windows is opened:
And all works fine, I insert my credential and I can work with it.
Then I want to log out to consent to other users to login, but I can't find in the documentation the way.
I tried:
portal.user = null
portal.cancelLoad()
portal = false
delete portal;
But if I click the login bottom, the login windows doesn't appear and the old user is already connected!
Thanks