OAuth failed: Exception: GITHUB_CLIENT_ID environment variable is not set
- Go to: https://github.com/settings/developers
- Click: "New OAuth App"
- Fill in:
Application name: GitDoIt Homepage URL: https://github.com/berlogabob/flutter-github-issues-todo Authorization callback URL: https://github.com/login/oauth/access_token - Click: "Register application"
- Copy your Client ID (looks like:
Iv1.xxxxxxxxxxxx)
Edit .env file:
# Open .env file
nano .env
# Replace this line:
GITHUB_CLIENT_ID=your_client_id_here
# With your actual Client ID:
GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxSave and run:
make run-with-envOr manually:
flutter run --dart-define=GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxNow when you click "Login with GitHub":
- Dialog appears with code
- Click "Open in Browser"
- GitHub opens in browser
- Enter code on GitHub
- Authorize GitDoIt
- You're logged in!
Don't want to setup OAuth? Use a PAT instead:
- Go to: https://github.com/settings/tokens
- Click: "Generate new token (classic)"
- Name:
GitDoIt - Scopes:
- ✅
repo - ✅
read:org - ✅
write:org - ✅
project
- ✅
- Generate and copy token
- In app: Click "Use Personal Access Token" and paste token
# Run with OAuth from .env file
make run-with-env
# Or manually
flutter run --dart-define=GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxx
# Validate .env file
make validate-envStill getting error?
-
Check .env file exists:
cat .env
-
Verify Client ID is set (not
your_client_id_here) -
Run validation:
make validate-env
Need help? See OAUTH_SETUP.md for detailed guide.