WaspW
Wasp11mo ago
ayo

onBeforeSignup not erroring out

How can I break out of the signup process when doing a onBeforeSignup and it returns an error

I see this in the documentation
Wasp ignores the hooks' return values. The only exception is the onBeforeOAuthRedirect hook, whose return value affects the OAuth redirect URL.
https://wasp-lang.dev/docs/auth/auth-hooks#using-hooks
Auth hooks allow you to "hook into" the auth process at various stages and run your custom code. For example, if you want to forbid certain emails from signing up, or if you wish to send a welcome email to the user after they sign up, auth hooks are the way to go.
Was this page helpful?