-
Notifications
You must be signed in to change notification settings - Fork 154
docs: add OAuth and SMTP setup instructions #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rushikesh249
wants to merge
5
commits into
AOSSIE-Org:main
Choose a base branch
from
rushikesh249:docs/oauth-email-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7d842f1
docs: add OAuth and SMTP setup instructions
rushikesh249 bbe0c32
docs: fix README env duplication and SMTP code block formatting
rushikesh249 d3f86ce
docs: fix SMTP YAML code fence
rushikesh249 fcf25f4
docs: fix README encoding artifacts
rushikesh249 b4a0f67
docs: remove UTF-8 BOM from README
rushikesh249 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <p align="left"> | ||
| <p align="left"> | ||
| <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRpPlI1P7SK3pemg67VMPbvNzxYyk0UtlmJiQ&s" alt="Aossie Logo" height="120"/> | ||
| </p> | ||
|
|
||
|
|
@@ -88,7 +88,7 @@ The server will start on the port defined in the config file (default: `1313`). | |
| ### Notes | ||
| - Do **not** commit `config.prod.yml` to version control. | ||
| - Only `config.prod.sample.yml` should remain committed. | ||
|
|
||
| ` | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Frontend Configuration | ||
|
|
||
|
|
@@ -97,8 +97,10 @@ The server will start on the port defined in the config file (default: `1313`). | |
| 2. Add the following environment variables to the `.env` file: | ||
|
|
||
| ``` | ||
| VITE_BASE_URL="http://localhost:1313" | ||
| VITE_GOOGLE_CLIENT_ID="<YOUR_GOOGLE_OAUTH_CLIENT_ID>" | ||
| VITE_BASE_URL=http://localhost:1313 | ||
| VITE_GOOGLE_CLIENT_ID=<YOUR_GOOGLE_OAUTH_CLIENT_ID> | ||
|
|
||
| > **Note:** Do NOT wrap values in quotes. Restart frontend after changes. | ||
| ``` | ||
|
|
||
| - Replace `<YOUR_GOOGLE_OAUTH_CLIENT_ID>` with your actual Google OAuth Client ID from Google Cloud Console. | ||
|
|
@@ -121,11 +123,7 @@ VITE_GOOGLE_CLIENT_ID="<YOUR_GOOGLE_OAUTH_CLIENT_ID>" | |
| npm install | ||
| ``` | ||
|
|
||
| 3. Create a `.env` file and add: | ||
|
|
||
| ``` | ||
| VITE_BASE_URL="http://localhost:1313" | ||
| ``` | ||
| 3. See the earlier "Frontend Configuration" section for required environment variables. | ||
|
|
||
| 4. Start the development server: | ||
| ``` | ||
|
|
@@ -134,6 +132,45 @@ VITE_GOOGLE_CLIENT_ID="<YOUR_GOOGLE_OAUTH_CLIENT_ID>" | |
|
|
||
| --- | ||
|
|
||
| ### Google OAuth Setup (Local Development) | ||
|
|
||
| 1. Go to the [Google Cloud Console](https://console.cloud.google.com/). | ||
| 2. Create a new project or select an existing one. | ||
| 3. Enable the Google OAuth2 API. | ||
| 4. Go to "Credentials" in the left sidebar. | ||
| 5. Click "Create Credentials" > "OAuth 2.0 Client IDs". | ||
| 6. Set Application type to "Web application". | ||
| 7. In the "Authorized JavaScript origins", add: | ||
| - http://localhost:5173 | ||
| - http://127.0.0.1:5173 | ||
| - http://localhost:1313 | ||
| - http://127.0.0.1:1313 | ||
| 8. In the "Authorized redirect URIs", add the same URLs as above. | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 9. Download the credentials JSON file and note your Client ID. | ||
| 10. Exact match of URLs is required for proper functioning. | ||
|
|
||
| ### Email Verification Setup (Gmail SMTP App Password) | ||
|
|
||
| For email verification functionality, DebateAI uses SMTP for sending emails. If using Gmail: | ||
|
|
||
| 1. Enable 2-Factor Authentication on your Gmail account. | ||
| 2. Go to Google Account settings. | ||
| 3. Navigate to Security > 2-Step Verification > App passwords. | ||
| 4. Generate a new app password for "Mail". | ||
| 5. Use this app password in your SMTP configuration instead of your regular Gmail password. | ||
|
|
||
| Example SMTP configuration in config.prod.yml: | ||
| ```yaml | ||
| smtp: | ||
| host: "smtp.gmail.com" | ||
| port: 587 | ||
| username: "[email protected]" | ||
| password: "your-app-password-here" | ||
| senderEmail: "[email protected]" | ||
| ``` | ||
|
|
||
| > **Warning:** Never commit credentials to version control. | ||
|
|
||
| ## Contribution Guidelines | ||
|
|
||
| Thank you for your interest in contributing to **DebateAI**! We appreciate your efforts in making this project better. Please follow these best practices to ensure smooth collaboration. | ||
|
|
@@ -212,6 +249,8 @@ We look forward to your contributions! | |
|
|
||
| ## License | ||
|
|
||
| MIT © [AOSSIE](https://aossie.org) | ||
| MIT © [AOSSIE](https://aossie.org) | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
| ` | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.