Clarify external domain configuration for Twitch OAuth and Base URL
This commit is contained in:
@@ -31,9 +31,9 @@ This document provides instructions to set up and test the MultiChat Overlay app
|
||||
## 3. Configure Twitch API Credentials
|
||||
|
||||
1. **Create Twitch Application:** Go to the Twitch Developer Console (dev.twitch.tv/console/apps) and create a new application.
|
||||
* Set the **OAuth Redirect URLs** to `http://localhost/auth.php` (or `http://localhost:PORT/auth.php` if you're using a different port for your PHP server).
|
||||
* Set the **OAuth Redirect URLs** to `http://localhost/auth.php` for local development. When deploying to your external domain (e.g., `https://multichat.ramforth.net`), you must update this to `https://multichat.ramforth.net/auth.php` in both the Twitch Developer Console and `php/config.php`.
|
||||
2. **Get Client ID and Secret:** Note down your Client ID and generate a Client Secret.
|
||||
3. **Update `php/config.php`:** Open `/home/joe/MultiChatOverlay/php/config.php` and update the `TWITCH_CLIENT_ID`, `TWITCH_CLIENT_SECRET`, and `TWITCH_REDIRECT_URI` constants with your application's credentials.
|
||||
3. **Update `php/config.php`:** Open `/home/joe/MultiChatOverlay/php/config.php` and update the `TWITCH_CLIENT_ID`, `TWITCH_CLIENT_SECRET` constants with your application's credentials. Also, ensure `BASE_URL` is set correctly for your environment (e.g., `http://localhost` for local, `https://multichat.ramforth.net` for external).
|
||||
|
||||
## 4. Test the Application
|
||||
|
||||
|
||||
@@ -8,17 +8,19 @@ define('DB_PASS', '!Bdsbkh2!'); // Replace with your MySQL password
|
||||
define('DB_NAME', 'multichat_overlay');
|
||||
|
||||
// Twitch API credentials
|
||||
define('TWITCH_CLIENT_ID', 'hf00cu69zzjxbmtmjipzebrmsexuxt'); // Replace with your Twitch Client ID
|
||||
define('TWITCH_CLIENT_SECRET', '9iqweehbkx113hqmrhigk3rsaoiyqa'); // Replace with your Twitch Client Secret
|
||||
define('TWITCH_REDIRECT_URI', 'http://localhost/auth.php'); // Replace with your redirect URI
|
||||
define('TWITCH_CLIENT_ID', 'YOUR_TWITCH_CLIENT_ID'); // Replace with your Twitch Client ID
|
||||
define('TWITCH_CLIENT_SECRET', 'YOUR_TWITCH_CLIENT_SECRET'); // Replace with your Twitch Client Secret
|
||||
// For local development, use 'http://localhost/auth.php'. For external access, use your domain (e.g., 'https://multichat.ramforth.net/auth.php').
|
||||
define('TWITCH_REDIRECT_URI', 'http://localhost/auth.php');
|
||||
|
||||
// Session secret for secure cookies
|
||||
define('SESSION_SECRET', 'o2LuCTQHN1JMlR0HeciJTNTx9OMFg5zXBiEpes26ouo='); // IMPORTANT: Change this to a strong, random string
|
||||
define('SESSION_SECRET', 'YOUR_VERY_LONG_AND_RANDOM_SECRET_KEY'); // IMPORTANT: Change this to a strong, random string
|
||||
|
||||
// WebSocket server address
|
||||
define('WEBSOCKET_HOST', 'localhost');
|
||||
define('WEBSOCKET_PORT', 8080);
|
||||
|
||||
// Base URL for the application
|
||||
define('BASE_URL', 'http://localhost'); // Replace with your application's base URL
|
||||
// For local development, use 'http://localhost'. For external access, use your domain (e.g., 'https://multichat.ramforth.net').
|
||||
define('BASE_URL', 'http://localhost');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user