Select to view content in your preferred language

Prevent authentication prompt

482
2
Jump to solution
04-13-2023 05:29 AM
Aeseir
by
Frequent Contributor

As we use multiple servers to connect the spatial data from, some of them have authentication built into them, thus triggering a authentication prompt when attempting to load it.

 

I want to prevent this prompt from triggering, instead I want to have it trigger a function called recordFailureRequest().

 

this is how far i got:

 

try {
const data = await mapServerLayer.loadAll();
//process data
} catch (error) {
recordFailureRequest(error);
return null;
}

 

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can set esriConfig.request.useIdentity to false.

Undral

 

View solution in original post

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can set esriConfig.request.useIdentity to false.

Undral

 

0 Kudos
Aeseir
by
Frequent Contributor

That seems to have done the trick so far.

0 Kudos