UPDATE: This is resolved in Ignition versions 7.9.5 and higher. Make sure you also have the latest version of the WebDev module itself.
I am working on a simple JSON api to return some tag data. I have easily been able to implement the ‘Require Authentication’ checkbox. I am facing two issues. They both revolve around the fact that the user appears to get one shot entering their credentials.
If the user enters the credentials correctly, I can’t seem to find a way for them to log out and destroy the session dictionary related to the user. I have tried setting session[‘user’] to none, and also removing the ‘user’ key from the session dictionary. I also tried using system.security.logout(). Neither of these worked.
Additionally, if the credentials are entered incorrectly, the user does not get another chance to enter the credentials. They are forced to quit their browser and reopen it to try again.
Is there a way to destroy this session[‘user’] object and prompt the user to enter their login info again without forcing them to quit and reopen their browser?