8000 GitHub - christokur/reflex-sso-app
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

christokur/reflex-sso-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reflex SSO App

A Reflex application with FastAPI backend and SSO/OAuth authentication.

Features

  • Reflex frontend with responsive UI
  • FastAPI backend integration
  • Authentication with:
    • Username/password login
    • Google OAuth
    • GitHub OAuth
  • Protected routes
  • JWT token-based authentication
  • Persistent login with localStorage

Setup

  1. Clone the repository:
git clone https://github.com/christokur/reflex-sso-app.git
cd reflex-sso-app
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
# For development, you can use .env file
export SECRET_KEY="your-secret-key"
export GOOGLE_CLIENT_ID="your-google-client-id"
export GOOGLE_CLIENT_SECRET="your-google-client-secret"
export GITHUB_CLIENT_ID="your-github-client-id"
export GITHUB_CLIENT_SECRET="your-github-client-secret"
  1. Run the app:
reflex run
  1. Open your browser at http://localhost:3000

OAuth Configuration

Google OAuth

  1. Go to the Google Cloud Console
  2. Create a new project
  3. Navigate to "APIs & Services" > "Credentials"
  4. Create an OAuth 2.0 Client ID
  5. Set the authorized redirect URI to http://localhost:3000/auth/callback/google
  6. Copy the Client ID and Client Secret to your environment variables

GitHub OAuth

  1. Go to your GitHub Settings
  2. Navigate to "Developer settings" > "OAuth Apps"
  3. Create a new OAuth App
  4. Set the authorization callback URL to http://localhost:3000/auth/callback/github
  5. Copy the Client ID and Client Secret to your environment variables

Project Structure

reflex_sso_app/
├── reflex_sso_app/
│   ├── __init__.py         # App initialization
│   ├── main.py             # Main app module
│   ├── state.py            # State management
│   ├── api/                # FastAPI backend
│   │   ├── __init__.py     # API initialization
│   │   └── auth.py         # Authentication endpoints
│   ├── components/         # Reusable components
│   │   ├── layout.py       # Layout component
│   │   └── navbar.py       # Navigation bar
│   └── pages/              # App pages
│       ├── index.py        # Home page
│       ├── login.py        # Login page
│       └── dashboard.py    # Dashboard (protected)
└── requirements.txt        # Dependencies

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0