What's the best way to temporarily disable sign-up...
# support-questions
m
What's the best way to temporarily disable sign-up? I want to keep the existing users on my core.
r
Which recipe are you using?
m
emailpassword for node.js
r
1. First you can hide the sign up toggle button in the form by using CSS: https://supertokens.com/docs/emailpassword/common-customizations/styling/changing-style 2. You can override the sign up component to return
null
in case the user manually navigates to the sign up UI. Look at https://supertokens.com/docs/emailpassword/advanced-customizations/react-component-override/usage 3. Disable the sign up API on the backend: https://supertokens.com/docs/emailpassword/advanced-customizations/apis-override/disabling
m
Thank you!
I'm getting an error for step 3.
r
What’s the error?
m
type: 'GENERAL_ERROR', message: 'Config schema error in emailpassword recipe: input config is not allowed to have the additional property "override". Did you mean to set this on the frontend side?',
r
Can I see the code change?
And what version of the SDK are you using?
m
How do I check my SDK version?
r
Package.json file
m
^4.1.2
Also here's the changed code.
r
Ah i see. You are using a very old version of the node SDK, and that's why you don't have that feature. To use the override feature, you should upgrade to node sdk version >= 6.0. Here is the changelog: https://github.com/supertokens/supertokens-node/blob/master/CHANGELOG.md If you do not want to upgrade the SDK, then you can create the same route for sign up before you add the supertokens middleware and then in that route, you can return some response saying it's not allowed.
5 Views