Describe your bug or feature request.

When using the site as a guest, the checkout flow allows the user to continue as a guest or continue with a user name / password. Sites that use modules like cas may place a "CAS Login" link on the `/user/login` page. However, when using these modules together, there is currently no clear way to add the CAS login link to the login step of the checkout workflow.

I could configure the CAS module to redirect all access to `/checkout` to our CAS server, requiring logins there in order to check out. But that doesn't give users the option to proceed as guest users, and a sudden redirect may be confusing, especially if users haven't created CAS accounts with us yet.

It's worth noting that for `/user/login`, it's possible to hide user name and password fields via a custom extension like so:

<pre>
function MY_MODULE_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form_id == 'user_login_form') {
    $form['name']['#access'] = FALSE;
    $form['pass']['#access'] = FALSE;
    $form['actions']['#access'] = FALSE;
  }
}

</pre>

But the form data for the `commerce_checkout_flow_multistep_default` form doesn't provide detailed data for modifying it via a module. It seems to only provide:

<pre>
Form: Array ( [class] => Array ( [0] => commerce-checkout-flow-multistep-default [1] => commerce-checkout-flow ) ) 

Perhaps there could be options for enabling externalauth, and disabling password-based logins under `/admin/commerce/config/checkout-flows`?

Comments

eeprom created an issue.