firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.15k stars 184 forks source link

Is there a way to disable the option to create users when there is none with the provided email? #520

Closed lucasmonteiro58 closed 1 year ago

lucasmonteiro58 commented 1 year ago

I would like to disable the option to create a user here when the login method is 'password'. When there is no user with the provided email, it displays the message 'No user found with that email. Pick a password to create a new account.' I want to deactivate this and only keep the users I created through the Firebase panel. How can I do that?

screenshot

fgatti675 commented 1 year ago

Hi @lucasmonteiro58 I am afraid it is not possible ATM, but we keep this as a feature request.

richardszegh commented 1 year ago

I am not sure if I understand your question correctly, but if you mean you want to disable the sign ups, so that only users added through Firebase are able to login (no sign ups enabled on FireCMS), it's possible by providing your custom Login view:

// app.tsx

function MyLoginView(props: FirebaseLoginViewProps) {
  return <FirebaseLoginView {...props} disableSignupScreen />;
}

function App() {
  ...

  return (
    <FirebaseCMSApp
      ...
      signInOptions={['password']}
      LoginView={MyLoginView}
      ....
    />
  );
}
fgatti675 commented 1 year ago

Thank you @richardszegh We should probably make it easier to implement this behaviour