Fix Twitch OAuth redirect URI and update setup instructions
This commit is contained in:
19
php/auth/twitch/login.php
Normal file
19
php/auth/twitch/login.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// php/auth/twitch/login.php - Initiates Twitch OAuth flow
|
||||
|
||||
require_once '../../config.php';
|
||||
|
||||
// Scopes required to get user's email and channel info
|
||||
$scopes = "user:read:email chat:read"; // Ensure chat:read is included
|
||||
|
||||
$auth_url = (
|
||||
"https://id.twitch.tv/oauth2/authorize" .
|
||||
"?client_id=" . TWITCH_CLIENT_ID .
|
||||
"&redirect_uri=" . TWITCH_REDIRECT_URI .
|
||||
"&response_type=code" .
|
||||
"&scope=" . urlencode($scopes)
|
||||
);
|
||||
|
||||
header("Location: " . $auth_url);
|
||||
exit();
|
||||
?>
|
||||
Reference in New Issue
Block a user