Select to view content in your preferred language

Prevent authentication prompt

409
2
Jump to solution
04-13-2023 05:29 AM
Aeseir
by
Occasional 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
Occasional Contributor

That seems to have done the trick so far.

0 Kudos