@@ -119,6 +119,42 @@ REACT_APP_FIREBASE_STORAGE_BUCKET=""
119119REACT_APP_FIREBASE_MESSAGING_SENDER_ID=""
120120REACT_APP_FIREBASE_APP_ID=""
121121```
122+ ## GitHub Authentication Setup
123+
124+ To enable GitHub authentication for the Custom Code Editor, follow these steps:
125+
126+ 1 . ** Enable GitHub Authentication in Firebase Console:**
127+ - Go to your Firebase project in the [ Firebase Console] ( https://firebase.google.com/ ) .
128+ - Navigate to ** Authentication** > ** Sign-in method** .
129+ - Enable ** GitHub** as a sign-in provider.
130+ - In the GitHub configuration, click ** Add app** , which will take you to the GitHub Developer settings to register a new OAuth application.
131+
132+ 2 . ** Register a New OAuth Application on GitHub:**
133+ - Go to your GitHub [ Developer Settings] ( https://github.com/settings/developers ) .
134+ - Click on ** OAuth Apps** and select ** New OAuth App** .
135+ - Fill in the application details:
136+ - ** Application Name** : Custom Code Editor
137+ - ** Homepage URL** : ( ` http://localhost:3000 ` for local development)
138+ - ** Authorization Callback URL** : ( ` http://localhost:3000 ` for local development)
139+ - Click ** Register Application** .
140+
141+ 3 . ** Retrieve GitHub Client ID and Client Secret:**
142+ - Once the app is registered, you will see the ** Client ID** and ** Client Secret** in the GitHub OAuth App settings. Copy these values.
143+
144+ 4 . ** Add GitHub OAuth Credentials to Firebase:**
145+ - Return to the Firebase Console and go back to the ** GitHub** provider configuration.
146+ - Enter the ** Client ID** and ** Client Secret** from GitHub.
147+ - Save these settings.
148+
149+ 5 . ** Update Environment Variables:**
150+ - Open your ` .env ` file in your project root and add the following:
151+
152+ ``` plaintext
153+ REACT_APP_GITHUB_CLIENT_ID=YOUR_GITHUB_CLIENT_ID
154+ REACT_APP_GITHUB_CLIENT_SECRET=YOUR_GITHUB_CLIENT_SECRET
155+ ```
156+
157+ - Replace `YOUR_GITHUB_CLIENT_ID` and `YOUR_GITHUB_CLIENT_SECRET` with the values you copied from GitHub.
122158
123159## Local Configuration
124160
0 commit comments