Multiple links using tokens only show first map

Bob Alooza 5 years ago

I am trying to setup multiple links using user tokens. This is for a Santa "drive by" in multiple neighborhoods. I have created multiple users, each with a kml map showing the route Santa will follow. The problem I have is when I use the token link for one route, and then try to use another token link, it still shows the initial map. The only way I have determined to show the new map is to either logout on the top right, or clear the browser cache. Is there a way to force the subsequent maps to show correctly? Force a logout? Or alternatively, is there a way to have the long and lat on the url, and create a single token user with multiple URLs?

Anton Tananaev 5 years ago

I think if token changed, it probably makes sense to re-logout the user.

Bob Alooza 5 years ago

Is there a way to do that without user interaction? Just want to make this as simple as possible for regular folk wanting to see Santa.

Anton Tananaev 5 years ago

You would need to change the code to do that.

Anton Tananaev 5 years ago

This is relevant code on the web side:

https://github.com/traccar/traccar-web/blob/master/web/app/controller/Root.js#L91

But looks like you actually just need to change back-end behavior somewhere in this function:

https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/api/resource/SessionResource.java#L59

Bob Alooza 5 years ago

That is over my head, was hoping for a quick simple solution. All good. Thanks for your help though. Appreciate this project as well, we use traccar for a local fire department and it has proven itself very useful.

Anton Tananaev 5 years ago

Where do you plan to use it? Maybe we can help anyway. Can you please send me a bit more details to support@traccar.org.