-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (27 loc) · 735 Bytes
/
Copy pathindex.php
File metadata and controls
31 lines (27 loc) · 735 Bytes
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
<?php
require_once('config.php');
require_once('helpers.php');
// Validate configuration
validateConfig();
// Ensure proper URL formatting
$appCallbackUrl = ensureTrailingSlash(BASE_URI) . "callback.php";
$provider = "https://auth.riotgames.com";
$authorizeUrl = ensureTrailingSlash($provider) . "authorize";
$clientID = RIOT_CLIENT_ID;
$redirectUri = urlencode($appCallbackUrl);
$authorizationUrl = $authorizeUrl . "?redirect_uri=" . $redirectUri
. "&client_id=" . $clientID
. "&response_type=code"
. "&scope=openid";
?>
<!DOCTYPE html>
<html>
<head>
<title>Riot Games Login</title>
</head>
<body>
<a href="<?= htmlspecialchars($authorizationUrl) ?>">
Click to login with Riot
</a>
</body>
</html>