Skip to content

Commit d9a8fc1

Browse files
authored
Merge pull request #149 from tusharshah21/github_readme
Readme for setting up Readme.md
2 parents 2455995 + e12551c commit d9a8fc1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,42 @@ REACT_APP_FIREBASE_STORAGE_BUCKET=""
119119
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=""
120120
REACT_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

Comments
 (0)