Index: /extensions/oAuth/admin/providers.php
===================================================================
--- /extensions/oAuth/admin/providers.php	(revision 23807)
+++ /extensions/oAuth/admin/providers.php	(revision 23808)
@@ -23,5 +23,5 @@
     }
     
-    if ( ($id=='Wordpress' or $id=='Flickr') and $data['enabled'] and !@$providers['OpenID']['enabled'] ) // in the template, OpenID must be before other OpenID based providers
+    if ( ($id=='Wordpress' or $id=='Flickr' or $id=='Steam') and $data['enabled'] and !@$providers['OpenID']['enabled'] ) // in the template, OpenID must be before other OpenID based providers
     {
       array_push($page['errors'], sprintf(l10n('OpenID must be enabled in order to use %s authentication'), $id));
Index: /extensions/oAuth/admin/template/style.css
===================================================================
--- /extensions/oAuth/admin/template/style.css	(revision 23807)
+++ /extensions/oAuth/admin/template/style.css	(revision 23808)
@@ -9,6 +9,7 @@
 }
 
-h4 {
-  text-align:left !important;
+.content h4 {
+  text-align:left;
+  margin:5px 0 0 0;
 }
 
@@ -35,6 +36,9 @@
   background:rgba(256,0,0,0.1);
 }
-  .provider table tr td:first-child {
+  .provider table tr td {
     vertical-align:top;
+  }
+  .provider table tr td:nth-child(2) {
+    padding-top:8px;
   }
   .provider table tr td.keys {
@@ -54,5 +58,5 @@
     margin:5px;
   }
-.Wordpress, .OpenID, .Flickr {
+.Wordpress, .OpenID, .Flickr, .Steam {
   display:inline-block;
 }
Index: /extensions/oAuth/auth.php
===================================================================
--- /extensions/oAuth/auth.php	(revision 23807)
+++ /extensions/oAuth/auth.php	(revision 23808)
@@ -19,5 +19,5 @@
     or !$hybridauth_conf['providers'][$provider]['enabled']
   ) {
-    throw new Exception('Hacking attempt!', 1002);
+    throw new Exception('Invalid provider!', 1002);
   }
   
Index: /extensions/oAuth/include/functions.inc.php
===================================================================
--- /extensions/oAuth/include/functions.inc.php	(revision 23807)
+++ /extensions/oAuth/include/functions.inc.php	(revision 23808)
@@ -27,17 +27,23 @@
   global $hybridauth_conf;
   
-  $out = array();
-  
-  foreach ($hybridauth_conf['providers'] as $id => $data)
-  {
-    if ($data['enabled'])
-    {
-      $out[$id] = $data;
-    }
-  }
-  
-  return $out;
+  return array_filter($hybridauth_conf['providers'], create_function('$p', 'return $p["enabled"];'));
 }
 
+function oauth_assign_template_vars()
+{
+  global $template, $conf;
+  
+  if ($template->get_template_vars('OAUTH_URL') == null)
+  {
+    $template->assign(array(
+      'oauth' => $conf['oauth'],
+      'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',
+      'OAUTH_PATH' => OAUTH_PATH,
+      'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/',
+      'PROVIDERS' => get_activated_providers(),
+      'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/',
+      ));
+  }
+}
 
 ?>
Index: /extensions/oAuth/include/providers_stats.inc.php
===================================================================
--- /extensions/oAuth/include/providers_stats.inc.php	(revision 23807)
+++ /extensions/oAuth/include/providers_stats.inc.php	(revision 23808)
@@ -61,4 +61,9 @@
     'new_app_link'      => null,
   ),
+  'Steam' => array( 
+    'label'             => 'Steam',
+    'provider_name'     => 'Steam',
+    'new_app_link'      => null,
+  ),
   'Wordpress' => array( 
     'label'             => 'Wordpress',
Index: /extensions/oAuth/include/public_events.inc.php
===================================================================
--- /extensions/oAuth/include/public_events.inc.php	(revision 23807)
+++ /extensions/oAuth/include/public_events.inc.php	(revision 23808)
@@ -35,5 +35,5 @@
     $_SESSION['page_errors'][] = sprintf(l10n('You registered with a %s account, please sign in with the same account.'), $provider);
     
-    $redirect_to = get_root_url().'identification.php';
+    $redirect_to = get_root_url().'identification.php'; // variable used by identification.php
     return true;
   }
@@ -50,5 +50,5 @@
   global $conf, $template, $hybridauth_conf, $page;
   
-  // comming from identification page
+  // coming from identification page
   if (pwg_get_session_var('oauth_new_user') != null)
   {
@@ -66,5 +66,5 @@
       {
         pwg_unset_session_var('oauth_new_user');
-        throw new Exception('Hacking attempt!');
+        throw new Exception('Hacking attempt!', 403);
       }
     
@@ -142,5 +142,5 @@
 function oauth_begin_profile()
 {
-  global $template, $user, $conf, $hybridauth_conf;
+  global $template, $user, $conf, $hybridauth_conf, $page;
   
   $query = '
@@ -254,6 +254,6 @@
   $add = 'disabled="disabled" ';
   $script = '
-{footer_script}
-jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent("li").css("display", "none");
+{footer_script require="jquery"}
+jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent().css("display", "none");
 {/footer_script}';
 
@@ -276,20 +276,3 @@
 }
 
-
-function oauth_assign_template_vars()
-{
-  global $template, $conf;
-  
-  if ($template->get_template_vars('OAUTH_URL') == null)
-  {
-    $template->assign(array(
-      'oauth' => $conf['oauth'],
-      'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',
-      'OAUTH_PATH' => OAUTH_PATH,
-      'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/',
-      'PROVIDERS' => get_activated_providers(),
-      'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/',
-      ));
-  }
-}
 ?>
Index: /extensions/oAuth/main.inc.php
===================================================================
--- /extensions/oAuth/main.inc.php	(revision 23807)
+++ /extensions/oAuth/main.inc.php	(revision 23808)
@@ -108,5 +108,5 @@
     if ( empty($hybridauth_conf) and strpos(@$_GET['page'],'plugin-'.OAUTH_ID)===false )
     {
-      array_push($page['warnings'], l10n('OAuth: You need to configure the credentials'));
+      array_push($page['warnings'], '<a href="'.OAUTH_ADMIN.'">'.l10n('OAuth: You need to configure the credentials').'</a>');
     }
     if (!function_exists('curl_init'))
Index: /extensions/oAuth/template/auth.tpl
===================================================================
--- /extensions/oAuth/template/auth.tpl	(revision 23807)
+++ /extensions/oAuth/template/auth.tpl	(revision 23808)
@@ -25,5 +25,5 @@
   
   <script type="text/javascript">
-    setTimeout('window.location.href = "{$SELF_URL}{$LOADING}";', 200);
+    setTimeout('window.location.href = "{$SELF_URL}{$LOADING}";', 500);
   </script>
   
Index: /extensions/oAuth/template/identification_common.tpl
===================================================================
--- /extensions/oAuth/template/identification_common.tpl	(revision 23807)
+++ /extensions/oAuth/template/identification_common.tpl	(revision 23808)
@@ -45,10 +45,10 @@
   
   switch(idp) {
-    case 'OpenID': case 'Wordpress': case 'Flickr':
+    case 'OpenID': case 'Wordpress': case 'Flickr': case 'Steam':
       switch(idp) {
 {/literal}
         case 'OpenID':
           jQuery("#openid_label").html('{'Please enter your OpenID URL'|@translate|escape:javascript}'); break;
-        case 'Wordpress': case 'Flickr':
+        case 'Wordpress': case 'Flickr': case 'Steam':
           jQuery("#openid_label").html('{'Please enter your username'|@translate|escape:javascript}'); break;
       }
@@ -91,4 +91,5 @@
     case 'Wordpress': oi = "http://" + oi + ".wordpress.com"; break;
     case 'Flickr': oi = "http://www.flickr.com/photos/" + oi + "/"; break;
+    case 'Steam': oi = "http://steamcommunity.com/openid/" + oi; break;
   }
 {/literal}  
Index: /extensions/oAuth/template/oauth_sprites.css
===================================================================
--- /extensions/oAuth/template/oauth_sprites.css	(revision 23807)
+++ /extensions/oAuth/template/oauth_sprites.css	(revision 23808)
@@ -16,4 +16,5 @@
 .oauth_16px.wordpress { background-position: -144px 0px; }
 .oauth_16px.yahoo { background-position: -160px 0px; }
+.oauth_16px.steam { background-position: -176px 0px; }
 
 .oauth_26px {
@@ -34,4 +35,5 @@
 .oauth_26px.wordpress { background-position: -234px 0px; }
 .oauth_26px.yahoo { background-position: -260px 0px; }
+.oauth_26px.steam { background-position: -286px 0px; }
 
 .oauth_38px {
@@ -52,2 +54,3 @@
 .oauth_38px.wordpress { background-position: -342px 0px; }
 .oauth_38px.yahoo { background-position: -380px 0px; }
+.oauth_38px.steam { background-position: -418px 0px; }
