Using userToken in a URL

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 9
Joined: Tue Dec 18, 2018 4:45 pm
PostPosted: Wed Feb 13, 2019 3:37 pm
Hi,

I have users who may use the same device but I want to ensure that they only use their calendar by forcing it in the initial URL that gets called from Filemaker.

I tried to force this by using the userToken in the URL but it seems that if I have a user without a userToken and send an empty or invalid token in my URL, it just acts like it wasn't in the URL and picks up the last one used in that browser.

How can I force the login screen in this situation ?
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Wed Feb 13, 2019 5:04 pm
Great question, Chris.

There are a couple options, but either way, you'll need to harden your script in FileMaker to account for a blank userToken.

If a user doesn't log out of DayBack, the browser keeps them logged in. Since both users are logged in on the same computer and user, that means that if no user token is passed to the WebViewer, the last logged in user will be the account that is opened.

You can either prevent the WebViewer from loading if there is no user token set to be passed to the URL, or you can set the userToken parameter in the URL to something random (like "123") and DayBack will log the current user out and load to the login page.

Let me know if that helps!

KC
Posts: 9
Joined: Tue Dec 18, 2018 4:45 pm
PostPosted: Wed Feb 13, 2019 5:13 pm
Thanks.

I did try a random token (like "invalid") but it ignored it and still used the current login. It also seemed to have problems with previously valid tokens which were no longer valid - the page just never appeared. You might want to check out those scenarios.

In any case, I will just prevent the user from moving on if Filemaker can't work out their correct token - not the best option but I'll go with it for now.

Chris.
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Thu Feb 14, 2019 8:47 am
Hi Chris,

I've verified directly in the browser that entering an invalid user token will log the browser out of DayBack, so I'll have to try this in a WebViewer to see if I get the same results.

Regards,

KC
SeedCode Staff
SeedCode Staff
Posts: 357
Joined: Tue Nov 08, 2016 1:54 pm
PostPosted: Mon Feb 18, 2019 4:43 pm
Hi Chris,

I verified that passing userToken=123 as a parameter to the URL in a FileMaker WebViewer will log out of DayBack and go to the sign-in screen, so if you're still unable to make it work, send us the URL you're trying to [email protected] and we'll dive into what might be making it not work for in your solution.

Regards,

KC
Posts: 9
Joined: Tue Dec 18, 2018 4:45 pm
PostPosted: Tue Feb 26, 2019 2:51 pm
Hi,

I suspect it's something to do with caching on the browser, and I was testing on the same browser using different user Ids so it was probably pretty confused. I'll let it go for now. Thanks for your time.

Chris.
SeedCode Staff
SeedCode Staff
Posts: 17
Joined: Tue Dec 04, 2018 10:21 am
PostPosted: Tue Feb 26, 2019 3:57 pm
Thanks for the update, Chris!

Best wishes,
Ana

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 1 guest

(855) SEEDCODE
[email protected]
Follow us: