I'm using Clerk to implement authentication for my application. It's an app that will only be used internally so I just want the people I give access to be able to sign in. I don't really want anyone to have the ability to sign up themselves. I like Clerk for how easy it is to add auth to apps but I'm not seeing a way to disable the sign up feature. Has anyone tried this?
Asked
Active
Viewed 1,677 times
6
-
1I reached out to Clerk directly, as well as asked the same question in their Discord. Seems the only way to achieve this is to create a custom sign in form. I'll be doing this in the upcoming days, will let you know if it is possible. – Phobos May 23 '23 at 07:41
-
Also interested in this, as I only need auth for a select few pre-defined admins. – Joreyaesh Jun 02 '23 at 17:47
-
1@Phobos hi Phobos, can you provide an update if you were able to succesfully keep your clerk singup disabled? – op_exchanger Jul 26 '23 at 13:25
-
1@op_exchanger I was able to remove the sign up hyperlink by overriding the css on the form, as to whether or not it is still accessible I don't know - I'll have to have a look the next time I'm developing the app. – Phobos Jul 31 '23 at 15:29
2 Answers
0
In this case I'm using Nextjs, navigate to _app.tsx file inside src/app/pages folder
import { ClerkProvider } from "@clerk/nextjs";
const MyApp: AppType = ({ Component, pageProps }) => {
return (
<ClerkProvider appearance={{
elements: {
footer: "hidden",
},
}}>
<Component {...pageProps} />
</ClerkProvider>
)}
So in this scenario, if you want users to not be able to signup...you can simply disable the signup text below which says "Don't have an account? Signup" by modifying the whole element with css . The css class of the signup text is - footer, which you can edit in your own way. for more, read the doc: https://clerk.com/docs/users/build-your-own-ui

Melvin
- 1
- 2
-
What's happening here, can you explain how your solution answers the question? – Asplund Jun 08 '23 at 09:30
-
If you have experience in clerk then you might know about the clerk ui customization. Simply hide the sign up text below by adding the appearance attribute inside the signIn or maybe the main
tag. – Melvin Jun 08 '23 at 17:28 -
Thanks for response Melvin, I was asking as a part of review. If you want to clarify your answer please use the edit button so future visitors will understand your answer better. Cheers – Asplund Jun 08 '23 at 18:38
0
The only secure way to do that is using the allow list option in your Clerk dashboard.
Turning on the white list with out identifiers will give you the expected behavior.
https://clerk.com/docs/authentication/allowlist
The bad new is that you can't use it in production mode with the free plan

Zahit Rios
- 111
- 6