Hi All,
I am trying to add the credentials via ArcGISEnvironment.authenticationManager.arcGISCredentialStore.addForUri()
I have logged into the AGOL via WebView and after successful login. I am trying to add the credentials. I tried following,
final credentialMap = {
"token": token,
"userId": username,
"expiration": expireTime.toIso8601String(),
};
final tokenCredential = ArcGISCredential.fromJson(credentialMap);
// Add credential to the store
ArcGISEnvironment.authenticationManager.arcGISCredentialStore.addForUri(
credential: tokenCredential,
uri: Uri.parse(portalURL),
);
final portal = Portal.arcGISOnline(
connection: PortalConnection.authenticated,
);
await portal.load();I checked every thing none of value is null in credentialMap, but I am still getting an exception line no. 7 - "Null check operator used on a null value".
Not sure what I am missing here. Any help would be appreciated.
fyi, I successfully login and have the token and other user details, its just I want to use Portal APIs exposed by SDK. I am looking to get the license info so that app could work offline and use portal APIs. It appears there is no url to get the license via http call.