aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php18
-rw-r--r--phpBB/styles/prosilver/template/login_body.html2
2 files changed, 18 insertions, 2 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index eeb4b23be4..e43579a740 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -238,6 +238,22 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
*/
public function get_login_data()
{
- return array();
+ $login_data = array();
+
+ foreach ($this->service_providers as $service_name => $service_provider)
+ {
+ // Only include data if the credentials are set
+ $credentials = $service_provider->get_service_credentials();
+ if ($credentials['key'] && $credentials['secret'])
+ {
+ $login_data[$service_provider] = array();
+
+ // Build the redirect url for the box
+ $redirect_url = build_url(false) . '&oauth_service=' . $service_name;
+ $login_data[$service_provider]['url'] = redirect($redirect_url, true);
+ }
+ }
+
+ return $login_data;
}
}
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index 4a51cf477f..85a47be4ad 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -49,7 +49,7 @@
</div><!-- IF OAUTH_LOGIN -->
<div class="content">
- hi
+
</div><!-- ENDIF -->
</div>
</div>