Remove links in the login block I want to remove the following default links on the login block. 


Create new account
Reset your password


I used hook_form_alter() but there is nothing in there that creates these links.
Method #1

Implement hook_preprocess_block() in your module/theme.

/**
 * Implements hook_preprocess_HOOK().
 */
function HOOK_preprocess_block__user_login_block(&amp;$variables) {
  $variables['content']['user_links']['#access'] = FALSE;
}


Method #2

Override block--user-login-block.html.twig template and replace {{ content }} with the following {{ content|without('user_links') }}.

Note that hiding those links would not protect respective pages (user/register and user/password) from direct access.