How to remove Create Account and Login with GitHub, Facebook etc features from accounts-ui


#1

So leaving only just the Login, as I just want a single user and already (hashed) made password to login thanks


#2

You can use the accounts-ui package with the accounts-password login provider package, to get the normal username/password login UI. You can then disable account creation by leveraging AccountsCommon#config. For example:

import { Accounts } from 'meteor/accounts-base'

Accounts.config({
  forbidClientAccountCreation: true,
});

#3

Hi Hugh,

But already have it in React component:

import React, { Component } from 'react';
import ReactDOM from 'react-dom';

export default class AccountsUI extends Component {

    componentDidMount() {
        this.view = Blaze.render(Template.loginButtons,
        ReactDOM.findDOMNode(this.refs.container));
    }

    componentWillUnmount() {
        Blaze.remove(this.view);
    }

    render() {
        return <span ref="container" />
    }
}

So where would you place

forbidClientAccountCreation: true

in this context? Or is it still valid in this case? Or you mean the suggestion is to place it in a separate config file?

EDIT: Placed in here, and I guess to also disable GitHub login I will need to do something similar with ?

import React, { Component } from 'react';
import ReactDOM from 'react-dom';

import { Accounts } from 'meteor/accounts-base'

Accounts.config({
    forbidClientAccountCreation: true
});

export default class AccountsUI extends Component {
:

#4

GitHub login should only show if you have the accounts-github login service package installed. To get rid of it just:

meteor remove accounts-github