UNPKG

google-oauth-cli-generator

Version:

CLI tool to quickly set up Google OAuth authentication for hackathons and projects

88 lines (62 loc) • 1.97 kB
# C:\Users\harsh\OneDrive\Pictures\Desktop\New folder (2)\test-output\ts-config-test Google OAuth authentication setup generated by CipherAI Auth CLI. ## šŸš€ Quick Start 1. Install dependencies: ```bash npm install ``` 2. Copy environment variables: ```bash cp .env.example .env ``` 3. Update your `.env` file with your actual values 4. Start the development server: ```bash npm run dev ``` ## šŸ“‹ Configuration ### Google OAuth Setup 1. Go to [Google Cloud Console](https://console.cloud.google.com/) 2. Create a new project or select existing one 3. Go to "APIs & Services" > "Credentials" 4. Create OAuth 2.0 Client ID 5. Add your redirect URI: `http://localhost:3000/callback` ### Environment Variables - `GOOGLE_CLIENT_ID`: Your Google OAuth Client ID - `GOOGLE_CLIENT_SECRET`: Your Google OAuth Client Secret - `REDIRECT_URI`: OAuth redirect URI - `SESSION_SECRET`: Secret for session encryption ## šŸ›  Tech Stack - **Frontend**: react - **Backend**: express - **Database**: None (in-memory) ## šŸ“ Project Structure ``` C:\Users\harsh\OneDrive\Pictures\Desktop\New folder (2)\test-output\ts-config-test/ ā”œā”€ā”€ frontend/ # react frontend code ā”œā”€ā”€ backend/ # express backend code ā”œā”€ā”€ .env.example # Environment variables template └── README.md # This file ``` ## šŸ”§ Development ### Frontend Development ```bash cd frontend npm run dev ``` ### Backend Development ```bash cd backend npm run dev ``` ## šŸš€ Deployment This setup is ready for deployment to: - Vercel (for Next.js) - Netlify (for React/Vanilla) - Heroku (for backend) - Railway (full-stack) ## šŸ“š Learn More - [Google OAuth 2.0 Documentation](https://developers.google.com/identity/protocols/oauth2) - [Passport.js Google Strategy](http://www.passportjs.org/packages/passport-google-oauth20/) --- Generated with ā¤ļø by [CipherAI Auth CLI](https://github.com/cipherai/auth-setup)