Hi all,
I am having troubles having my FeatureLayer show on my esri map after being added to the OperationalLayers of my map control. I am using the ArcGIS .NET SDK for .NET Maui, and OAuth 2.0 for Authentication and passing the token as a parameter for all private layers. Testing not working on iOS and Android.
My current flow is as follows:
Ive checked numerous things but I am stuck; subscribing to the LoadStatusChanged event shows that the layer is successfully loading, and we are still receiving the layer data, so it does not seem to be an Auth issue. Also, we have an implementation on Xamarin and we work in a very similar way (only difference is loading the FeatureLayer with a [ArcGISTokenCredential w/ a token]) and it is showing on the map.
Am I doing something wrong that the FeatureLayer isn't working despite the layer being Loaded with no errors? Is there are a required or suggested alternative method for handling the token? I have seen other threads mentioning to pass the token as a Auth header, but those methods didn't seem to work. All help is appreciated, thanks!
If you follow the OAuth implementation pattern there is no need to include a token in the Url. Including this may in be the issue.
When the app requests a secure service from the server AuthenticationManager will provide any required tokens.
Still having the same issue. I implemented the AuthenticationManager flow listed and it's still not working. Is there a special way to register the tokens, besides "AuthenticationManager.Current.AddCredential"? Additionally, is there a checklist to see if the feature layer data should be displaying on the map, or is it really so easy as:
1) Challenge and prompt login
2) Get credentials from prompt after successful login
3) Add credential to AuthenticationManager.Current via "AddCredentials"
4) Load FeatureLayer with service uri
5) Add to Operational Layers
Note*: I have correctly gotten a "Loaded" state when attaching the "LoadStatusChanged" event. I am able to access the uri with the token in the address, so why is it still not showing on the map when I zoom in to said location?