How to force openid login from a single provider in Drupal 7? So with the current Drupal 7's OpenID module, one must click on the "OpenID" on the main page, which the user then enter the url of the OpenID provider to link up to. Assuming I know exactly what provider I want to use (my university's), there some way I can make it such that as soon as a user visits the homepage, or any part of my drupal site, the first thing it does is authenticates with that specific provider url before it even shows the page?

The reason being is I want people within the university network to be able to go to the site and automatically see who they are without having them perform that extra step of clicking on an "openid" button. Much like a single-sign-on solution.
You must create a custom module to generate a page "/login" that start OpenID authenticate.

Create a module with this code :

/**
 * Implements hook_menu().
 */
function mymodule_menu() {

  $items['login'] = array(
    'title' =&gt; 'OpenID Login',
    'page callback' =&gt; 'openid_login',
    'access callback' =&gt; 'user_is_anonymous',
    'type' =&gt; MENU_CALLBACK,
  );

  return $items;
}

/*
 * Menu callback; start openid authenticate
 */
function mymodule_login() {

  $return_to = url('openid/authenticate', array('absolute' =&gt; TRUE, 'query' =&gt; array('destination' =&gt; 'user')));

  openid_begin("https://www.myopenid.com/", $return_to, array());
}


The example works with the myopenid.com provider.
Go to "/login" on your website to log in.