I have oAuth working - however the current user always comes back as null after I type my username and password:
IdentityManager.Current.OAuthAuthorizeHandler = new Esri.ArcGISRuntime.Toolkit.Security.OAuthAuthorizeHandler();
var item = await Esri.ArcGISRuntime.Portal.ArcGISPortalItem.CreateAsync(portal, "367f0a8a210d49218f7cb7bf5da994c8");
var portal = await Esri.ArcGISRuntime.Portal.ArcGISPortal.CreateAsync();
var user = portal.CurrentUser; //comes back null
How do I get the current user without re-authenticating?
Solved! Go to Solution.
Hi,
Try to pass the given token to the ArcGISPortal when you are creating it from IdentityManager.
Something like this :
var portal = await ArcGISPortal.CreateAsync(new Uri("http://www.arcgis.com/sharing/rest"), CancellationToken.None, token);
Hi,
Try to pass the given token to the ArcGISPortal when you are creating it from IdentityManager.
Something like this :
var portal = await ArcGISPortal.CreateAsync(new Uri("http://www.arcgis.com/sharing/rest"), CancellationToken.None, token);
Thanks!