Local Development Setup
Walks through configuring environment variables, generating a signing key, creating a Google OAuth app, and running the server locally.
What this file does
Walks through configuring environment variables, generating a signing key, creating a Google OAuth app, and running the server locally.
When to use it
- Setting up a local development environment for easy-oidc
- Testing OIDC integration with kubelogin on localhost
- First-time contributor to the easy-oidc repository
Assumes this stack
Local Development Setup
Quick Start
1. Copy the example environment file
cp .env.example .env
2. Generate an Ed25519 signing key
scripts/generate-ed25519-key.sh > pbcopy
Paste the output (copied to clipboard by pbcopy above) in .env:
EASYOIDC_SIGNING_KEY='-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEI...
-----END PRIVATE KEY-----'
3. Create a Google OAuth App
- Go to Google Cloud Console
- Create OAuth 2.0 Client ID
- Set authorized redirect URI:
http://localhost:8080/callback/google - Copy Client ID and Client Secret to
.env:
EASYOIDC_OAUTH_CLIENT_ID=123456789.apps.googleusercontent.com
EASYOIDC_OAUTH_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxxxxxxxx
4. Run easy-oidc
# Load environment variables (if using direnv or similar)
export $(cat .env | xargs)
# Run the server with the example local development config
./bin/easy-oidc --config examples/config/config-local-dev.jsonc --debug
5. Test with kubelogin
# In another terminal
kubectl oidc-login setup \
--oidc-issuer-url=http://localhost:8080 \
--oidc-client-id=kubelogin-local \
--oidc-extra-scope=email \
--oidc-extra-scope=groups
Environment Variables
The .env file should contain:
EASYOIDC_SIGNING_KEY- Ed25519 private key in PEM formatEASYOIDC_OAUTH_CLIENT_ID- OAuth client ID from Google/GitHubEASYOIDC_OAUTH_CLIENT_SECRET- OAuth client secret from Google/GitHub
Important: Do not commit .env to version control! It's already ignored in .gitignore.
Alternative: Using direnv
For automatic environment loading:
# Install direnv
brew install direnv # macOS
# Create .envrc
echo 'dotenv' > .envrc
direnv allow
# Now .env is automatically loaded when you cd into this directory
Troubleshooting
"environment variable not set" error:
- Make sure you've exported the variables:
export $(cat .env | xargs) - Or use a tool like
direnvfor automatic loading
"email not verified" error:
- Make sure your Google account email is verified
- Check the email in your Google profile
"unknown client_id" error:
- Make sure the client_id in the kubelogin command matches the config file
What's inside
5 numbered steps, 1 environment variables list, 1 alternative method, 3 troubleshooting entries
Change this for your project
- Replace
http://localhost:8080/callback/googlewith your own redirect URI if different - Replace
kubelogin-localwith your own OIDC client ID for testing - Replace
examples/config/config-local-dev.jsoncwith your own config file path
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Related Documents
Dev Setup Install Instructions
Walks through setting up a conda environment, installing dependencies, and configuring MinKNOW for simulated Flongle replay and adaptive sampling.
canvas_dev_setup
Guides developers through setting up a local Canvas LMS instance with Apache and integrating it with the Wiki Education Dashboard via LTI 1.3.
My current setup (2026 edition)
Documents a developer's personal IDE, terminal, macOS, iOS, hardware, and tooling choices in 2026.
dev_setup
Explains how to install, run, test, profile, and contribute to the Vimflowy project locally.