Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can a user trigger the Authenticator without coming across an authentication challenge? #549

Open
nishankhadka09 opened this issue Aug 29, 2024 · 1 comment

Comments

@nishankhadka09
Copy link

nishankhadka09 commented Aug 29, 2024

I wanted to perform something like this:
User goes to settings -> clicks Esri authentication -> Load Authenticator -> Authenticates
User then goes to map sources screen-> chooses Arcgis portal -> writes the portal id.
Then -> Map tries to load the portal
If it fails -> just show Toast with auth error.

But it seems like it can only be triggered once the sdk comes across Authentication Challenge.

Is there a way I can achieve the former, just want to make the app behave similar to a desktop app written in C#?

@nishankhadka09 nishankhadka09 changed the title Can a user not trigger the Authenticator without coming across an authentication challenge? Can a user trigger the Authenticator without coming across an authentication challenge? Aug 29, 2024
@eri9000
Copy link
Collaborator

eri9000 commented Sep 4, 2024

Hello @nishankhadka09

The Authenticator toolkit component will only be displayed when the user is trying to load a secured resource, meaning that it does not support preemptive prompting.
This is because the authenticator needs to know the resource's security type (either ArcGIS or Network) so that it is able to display the correct type of prompt.

In your case, if you know before hand what kind of portal the user is trying to load and what kind of security it supports, then you can create a credential, prompt the user, and add it to the credential cache for future use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants