https://github.com/art2url/solve-sync-oauth-server
🗄️ SolveSync OAuth Server – lightweight Express server that handles GitHub OAuth authentication for the SolveSync Chrome extension, enabling secure and seamless uploads of LeetCode solutions to GitHub repositories.
https://github.com/art2url/solve-sync-oauth-server
api authentication chrome-extension express-js expressjs github github-api github-oauth leetcode node node-js nodejs oauth oauth-server secure-authentication
Last synced: about 11 hours ago
JSON representation
🗄️ SolveSync OAuth Server – lightweight Express server that handles GitHub OAuth authentication for the SolveSync Chrome extension, enabling secure and seamless uploads of LeetCode solutions to GitHub repositories.
- Host: GitHub
- URL: https://github.com/art2url/solve-sync-oauth-server
- Owner: art2url
- License: mit
- Created: 2025-01-30T17:25:36.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-02-10T10:23:40.000Z (about 1 year ago)
- Last Synced: 2026-01-03T16:19:25.013Z (3 months ago)
- Topics: api, authentication, chrome-extension, express-js, expressjs, github, github-api, github-oauth, leetcode, node, node-js, nodejs, oauth, oauth-server, secure-authentication
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SolveSync OAuth Server
This server handles the OAuth authentication flow for the **SolveSync** Chrome extension, enabling secure GitHub authorization and token management.
## Features
- Secure OAuth authentication with GitHub.
- Exchanges authorization codes for access tokens.
- Retrieves GitHub user information using access tokens.
- Cross-Origin Resource Sharing (CORS) enabled for broad compatibility.
## Prerequisites
- **Node.js** (v12 or higher)
- **npm** or **yarn**
- A **GitHub OAuth App** with the following details:
- **Client ID** and **Client Secret**
## Setup
1. **Clone the Repository:**
```bash
git clone https://github.com/art2url/solve-sync-oauth-server.git
cd solve-sync-oauth-server
```
2. **Install Dependencies:**
```bash
npm install
```
3. **Configure Environment Variables:**
Create a `.env` file in the root directory:
```env
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
PORT=3000 # Optional: Defaults to 3000 if not set
```
4. **Run the Server:**
```bash
npm start
```
The server will run at `http://localhost:3000`.
## API Endpoints
### POST `/auth/github`
Exchanges the GitHub OAuth code for an access token and retrieves the GitHub username.
**Request:**
```json
{
"code": "authorization_code_from_github"
}
```
**Response:**
```json
{
"access_token": "github_access_token",
"github_username": "your_github_username"
}
```
## License
This project is licensed under the **MIT License**.
## Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
---
**SolveSync** — Automate your coding workflow with secure GitHub integration! 🚀