Hello, I am trying to make a button that triggers a login, regardless if I am already logged into the session or not. If the login was successful, I want to write a value to a tag.
Currently, when the button is pushed, the login window prompts a login, but the 'authentication challenge completed' script never gets run.
Note that nothing gets written to the tag here, leading me to believe this function is not being run. I have triple checked the tag path to be correct.
After you attempt to login, are there any errors in the gateway logs? What version of ignition are you using? Are there any security limitations on the tag that you are attempting to write to?
Also, you are calling value = payload['value'] in the auth challenge complete code, but I'm not seeing where a key called 'value' is being put into the payload from the button script, you only have isAction:True. At the very least I would expect you to find a dictionary keyError in your logs when attempting to run this event code.
Additionally, please post code, not pictures of code. It helps others try to troubleshoot code and is easier to read/see/copy.