Redirect after user login I would like to redirect users after they log in. Is it possible to use hook_user_login() to make the redirection? How do I add the parameter for the redirection?
You need to alter the login form and add a submit handler which will take care of the redirection. You cannot use $form_state-&gt;setRedirectUrl() directly in the form alter, since it will be overwritten by UserForm::submitForm().

/**
 * Implements hook_form_FORM_ID_alter().
 */
function mymodule_form_user_login_form_alter(&amp;$form, FormStateInterface $form_state) {
  $form['#submit'][] = 'mymodule_user_login_submit';
}

/**
 * Form submission handler for user_login_form().
 *
 * Redirects the user to the dashboard after logging in.
 */
function mymodule_user_login_submit(&amp;$form, FormStateInterface $form_state) {
  $url = Url::fromRoute('mymodule.dashboard');

  // Check if a destination was set, probably on an exception controller.
  // @see \Drupal\user\Form\UserLoginForm::submitForm()
  $request = \Drupal::service('request_stack')-&gt;getCurrentRequest();
  if (!$request-&gt;request-&gt;has('destination')) {
    $form_state-&gt;setRedirectUrl($url);
  }
  else {
    $request-&gt;query-&gt;set('destination', $request-&gt;request-&gt;get('destination'));
  }
}