From 5c7f2f17f9c471d306955df457c7cab4e5c6ed3b Mon Sep 17 00:00:00 2001 From: Snap Date: Thu, 16 Apr 2015 14:51:26 -0700 Subject: Google's OpenID Connect method $google_client_id & $google_client_secret must be added to db.inc.php! --- includes/header.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'includes/header.php') diff --git a/includes/header.php b/includes/header.php index d3256c3..cb34fac 100644 --- a/includes/header.php +++ b/includes/header.php @@ -180,11 +180,19 @@ function topbar($links) { //Empty first-div contains sound manager stuff echo '
'; + //Create Google login link! So simple... + global $google_client_id, $mydomain; + $googleLoginAuth = "https://accounts.google.com/o/oauth2/auth?response_type=code"; + $googleLoginAuth .= "&redirect_uri=" . urlencode($mydomain . 'login?op=google'); + $googleLoginAuth .= "&client_id=" . urlencode($google_client_id); + $googleLoginAuth .= "&scope=email&access_type=online&approval_prompt=auto"; + $googleLoginAuth .= "&openid.realm" . urlencode($mydomain); + echo '

Sign in

Please sign in using one of the following

- Sign in with Google + Sign in with Google Sign in with Facebook Sign in with Twitter Sign in with Yahoo -- cgit v1.2.3