# Allow Google or Auth0 users to register with an onBeforeRegistration hook

**URL:** <https://forum.klai.studio/t/allow-google-or-auth0-users-to-register-with-an-onbeforeregistration-hook/1295>\
**Category:** Support\
**Created:** [October 17, 2026, 2:00pm UTC](https://forum.klai.studio/t/allow-google-or-auth0-users-to-register-with-an-onbeforeregistration-hook/1295 "2026-10-17T14:00:34Z")\
**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 17, 2026, 2:00pm UTC](https://forum.klai.studio/t/allow-google-or-auth0-users-to-register-with-an-onbeforeregistration-hook/1295/1 "2026-10-17T14:00:34Z")

</div>

### Problem

OAuth login works for existing users, but new users receive `User not authorized to register`.

### Solution

Configure the `onBeforeRegistration` hook to return `true`. This explicitly permits registration for users authenticating through Google or Auth0.

### Thread Attachments

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

* * *

### Original Slack Thread

````plaintext
User U097MPHKU11: Hi, I was working on implementing *“Sign up with Google”* and *“Login with Google.” and facing an issue .* 
Login with Google is working only when the user is already registered. It allows the user to log in without entering their password. However, Sign up with Google always throws an error with the message *“User not authorized to register.”*
Later, we also tried using Auth0, but we faced the same issue there as well. The documentation also doesn't have any guide for creating a new user using Google or Auth0.
```{
    "action": "path",
    "options": {
        "sameWindow": true,
        "url": "/oauth/auth0"
    }
}```
User UBBJX2EHM: To allow the user to register watch the hook onBeforeRegistration. It needs to return true. 
User U097MPHKU11: Thanks, that part is done.
I just wanted to ask if there is any way to get rid of this interface and directly redirect the user to *“Continue with Google” screen .* 
User UBBJX2EHM: if you are just using google dont bother with Autho, and then you skip that all together. Auth) has a setting that can auto continue also, you will need to google

````
