# Registration errors caused by modified onBeforeRegistration hook behavior

**URL:** <https://forum.klai.studio/t/registration-errors-caused-by-modified-onbeforeregistration-hook-behavior/1309>\
**Category:** Support\
**Created:** [October 31, 2026, 2:00pm UTC](https://forum.klai.studio/t/registration-errors-caused-by-modified-onbeforeregistration-hook-behavior/1309 "2026-10-31T14:00:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BetterForms](https://forum.klai.studio/user_avatar/forum.klai.studio/betterforms/32/295_2.png) [@BetterForms](https://forum.klai.studio/u/BetterForms)\
**Post date:** [October 31, 2026, 2:00pm UTC](https://forum.klai.studio/t/registration-errors-caused-by-modified-onbeforeregistration-hook-behavior/1309/1 "2026-10-31T14:00:21Z")

</div>

**Problem:** New user registration failed because the `onBeforeRegistration` script contained a step assumed to apply only to OAuth registrations, although it was not actually OAuth-limited.\n\n **Solution:** Review customized registration hooks against the [Common Hooks documentation](https://docs.klai.studio/reference/hooksoverview/commonoverview). The default hook behavior may differ after the script is modified, so verify each step’s actual scope and conditions rather than relying on an outdated note.

### Thread Attachments

 ![Attached Image](https://forum.klai.studio/uploads/default/original/1X/f1d1db9f48fba6e19dcec0c205fadf3aa70604b2.png)

* * *

### Original Slack Thread

```plaintext
User UG7U0703A: Newly registering user is receiving this error, but as far as I can tell this originates in the Klai stack, and not from our helper or business file. Is something still off from security patches?
User UG7U0703A: Self resolved. The onBeforeRegistration script was failing in a weird way. There was a note that one step was OAuth only, but it was, in fast, NOT limited to OAuth.
User UBBJX2EHM: You mean that #$%^&amp; bot actually got something right?
I think a recent change may ping it , will check
User UBBJX2EHM: Turns out this one is covered in the docs: <https://docs.klai.studio/reference/hooksoverview/commonoverview|Common Hooks> The default beaviour is the same, but if you have modifed the script hten it woudl change

```
