# onAuthChallengeCompleted function not being run

**URL:** <https://forum.inductiveautomation.com/t/onauthchallengecompleted-function-not-being-run/98622>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 14, 2024, 5:01pm UTC](https://forum.inductiveautomation.com/t/onauthchallengecompleted-function-not-being-run/98622 "2024-11-14T17:01:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 15, 2024, 8:35pm UTC](https://forum.inductiveautomation.com/t/onauthchallengecompleted-function-not-being-run/98622/3 "2024-11-15T20:35:57Z")

</div>

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.

> [@Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831):
>
> This thread is intended as a short help file for all those struggling to post formatted code on the forum. Code block formatting Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting. [How to post code] Note that all the \</\> button does is add three backticks ``` on the line before the code block and anot…

---

_[View the full topic](https://forum.inductiveautomation.com/t/onauthchallengecompleted-function-not-being-run/98622)._
