forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhybridauth.php
51 lines (50 loc) · 2.49 KB
/
hybridauth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
global $hybridauth;
$config = array(
"base_url" => BASE_URI,
'callback' => BASE_URI . 'login-callback.php',
"providers" => array(
"Facebook" => array(
"enabled" => get_option('facebook_signin_enabled'),
"keys" => array("id" => get_option("facebook_client_id"), "secret" => get_option("facebook_client_secret")),
"trustForwarded" => false,
),
"Google" => array(
"enabled" => get_option('google_signin_enabled'),
"keys" => array("id" => get_option("google_client_id"), "secret" => get_option("google_client_secret")),
),
"LinkedIn" => array(
"enabled" => get_option('linkedin_signin_enabled'),
"keys" => array("id" => get_option("linkedin_client_id"), "secret" => get_option("linkedin_client_secret")),
"fields" => array(),
),
"Twitter" => array(
"enabled" => get_option('twitter_signin_enabled'),
"keys" => array("id" => get_option("twitter_client_id"), "secret" => get_option("twitter_client_secret")),
),
"WindowsLive" => array(
"enabled" => get_option('windowslive_signin_enabled'),
"keys" => array("id" => get_option("windowslive_client_id"), "secret" => get_option("windowslive_client_secret")),
),
"Yahoo" => array(
"enabled" => get_option('yahoo_signin_enabled'),
"keys" => array("id" => get_option("yahoo_client_id"), "secret" => get_option("yahoo_client_secret")),
),
"OpenID" => array(
"enabled" => get_option('oidc_signin_enabled'),
),
"MicrosoftGraph" => array(
"enabled" => get_option('microsoftgraph_signin_enabled'),
"keys" => array("id" => get_option("microsoftgraph_client_id"), "secret" => get_option("microsoftgraph_client_secret")),
"tenant" => get_option('microsoftgraph_client_tenant')
)
),
// debug_mode possible values
// - "error" log only error messages
// - "info" log info and error messages (ignore debug messages)
// - false
"debug_mode" => false,
// Path to file writable by the web server. Required if 'debug_mode' is not false
"debug_file" => ROOT_DIR."/hybridauth.log",
);
$hybridauth = new Hybridauth\Hybridauth($config);