This Flask application reads Fitbit OAuth configuration from the process environment. Never commit a populated .env file or a real client credential.
Set these variables before starting the application:
FITBIT_CLIENT_ID: the Fitbit OAuth client identifier.FITBIT_CLIENT_SECRET: the active Fitbit OAuth client secret.FITBIT_REDIRECT_URI: the registered OAuth callback URI, ending in/redirect.FLASK_SECRET_KEY: a long, randomly generated value used to sign Flask sessions.
.env.example contains placeholders only. Copy it to .env if your local tooling loads dotenv files, replace every placeholder locally, and keep .env untracked. The application itself reads the process environment and does not print configuration values.
For a local HTTP-only OAuth callback, set FITBIT_ALLOW_INSECURE_TRANSPORT=true explicitly in the development environment. Leave it unset or false everywhere else. This flag must never be enabled in production.
Create an isolated Python environment and install the existing runtime dependencies:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install Flask requests-oauthlibExport the four required variables with your own values, then run:
python app.pyThe development server listens on port 8080 by default. Set PORT to choose another port. Flask debug mode is disabled.