-
Notifications
You must be signed in to change notification settings - Fork 799
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
token repeating in url #1090
Comments
interesting catch! do you have any interest in submitting a PR to make that check a little more intelligent? also, why append a token to |
Reading https://github.com//Esri/esri-leaflet/wiki/FAQ#why-use-esri-leaflet under Which services require authentication it states;
It also notes that basemaps do not require authentication so it does seem ambiguous for a private / commercial app. I think I'm doing the right thing by getting a token from ArcGis (App login) and then passing it in. basemaps are the only service being used in this app at present. Although I'm assuming that the token does not get validated or tracked. If tokens do not need to be passed in then I guess there is no issue. I can have a go at a PR, I'm not that familiar with the code so it may take me a while. |
basemap requests don't require authentication. passing a token is purely a mechanism to circumvent rate-limits that are applied to anonymous requests.
that'd be sufficient to me. we can introduce more complex logic later if anyone ever actually gets bit by a stale token being passed through. |
I'm using the sample https://esri.github.io/esri-leaflet/examples/switching-basemaps.html as a base for a project that I'm working on.
I've modified the sample to pass in a token;
However if I select the same basemap type twice I notice that the token gets repeated in the URL. From the chrome developer tools - token=abc appears twice.
I think this is happening because when the basemap layer is initialised it appends the token to the urlTemplate which is static if one of the standard map types are used - from the esri-leaflet initialize function;
The text was updated successfully, but these errors were encountered: