[Vtigercrm-developers] INVALID_USER_CREDENTIALS error from webservice when multiple user access simultaneously

lajeesh k lajeeshk at gmail.com
Tue Aug 6 12:05:15 GMT 2019


Hello,

https://code.vtiger.com/vtiger/vtigercrm/issues/1164

INVALID_USER_CREDENTIALS error return from while using webservice

This error is triggering from include/Webservices/Login.php line 28

This error happens when multiple users using the webservice simultaneously

this error happens in this scenario. suppose we have a script
get_tickets.php to list all tickets.

We authenticate with username and accesskey of admin in this script.

user1 comes and run the get_ticket.php . Obviously the script will be first
doing the webservice login .

The script calls the getchallenge method and an auth tocken is generated on
the databases.

before the script call the login method for user1 , user2 runs the
get_tickets.php script and calls the get challenge method.

Now the authtocken get modified on the database. Hence the the auth tocken
is not valid for user1 and he cannot login and this exception will returned

The issue is because of regenerating auth tocken on each login request.

I am able to fix the issue by making the auth tocken static. It does not
regenerate on each request
Regards,
Lajeesh
Freelance developer / entrepreneur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190806/64f5672d/attachment.html>


More information about the vtigercrm-developers mailing list