Hello everybody,
I want to know about how to use this function (checkSignInStatus(resUrl)) cuz the thing i want to do is , when the user log in using the identitymanager (my service layer is with security), displays a message or welcome alert with the user id like :"Welcome Ms/Mrs: <userid>"
I dont know if im in the right way or the right function. I have read the doc api and it doesnt show any example.
Im using windows authentication.
Thanks for all ur help as always.
Have you taken a look at the OAuth samples?
OAuth Basic | ArcGIS API for JavaScript
OAuth Popup | ArcGIS API for JavaScript
These use the checkSignInStatus to populate the div userID with the user name
esriId.checkSignInStatus(info.portalUrl).then( function (){ displayItems(); } ).otherwise( function (){ // Anonymous view domStyle.set("anonymousPanel", "display", "block"); domStyle.set("personalizedPanel", "display", "none"); } ); function displayItems(){ new arcgisPortal.Portal("https://www.arcgis.com").signIn().then( function (portalUser){ console.log("Signed in to the portal: ", portalUser); domAttr.set("userId", "innerHTML", portalUser.fullName); domStyle.set("anonymousPanel", "display", "none"); domStyle.set("personalizedPanel", "display", "block"); queryPortal(portalUser); } ).otherwise( function (error){ console.log("Error occurred while signing in: ", error); } ); }
I will try them, but the oauth function only works with a Esri user account? Cuz i want to do something similar but without using an esri account, just with a windows domain account.
Thanks for ur answer
I couldnt do what i want to do.
I am using a secure service layer trying accessing with a windows account, but i dont know how to get when the user id when he already logged in succefully.
If anyone can help me with a code example will be useful.
Thanks