- Added FirebaseAuth struct and TokenVerifier interface for verifying Firebase ID tokens. - Introduced FirebaseConfig struct in config to manage Firebase credentials and project ID. - Implemented OAuth handler for Firebase ID token verification in HTTP handlers. - Added middleware for authenticating requests using Firebase tokens. - Updated router to conditionally apply authentication based on configuration. - Created tests for the new authentication middleware. - Added request and response types for Firebase OAuth handling. - Included a sample JSON file for testing purposes.
32 lines
660 B
Plaintext
32 lines
660 B
Plaintext
##################
|
|
## Frontend env ##
|
|
##################
|
|
WEB_PORT=3000
|
|
PUBLIC_BASE_PATH=/watch-party/
|
|
BACKEND_ORIGIN=http://api:8082
|
|
FRONTEND_MODE=debug
|
|
|
|
#################
|
|
## Backend env ##
|
|
#################
|
|
# Postgres (container)
|
|
POSTGRES_DB=watchparty
|
|
POSTGRES_USER=admin
|
|
POSTGRES_PASSWORD=admin
|
|
TZ=Asia/Tokyo
|
|
COMPOSE_PLATFORM=linux/arm64/v8
|
|
|
|
# App runtime (inside Docker network)
|
|
PGHOST=db
|
|
POSTGRES_PORT=5432
|
|
PGSSLMODE=disable
|
|
GIN_MODE=release
|
|
ADDR=:8082
|
|
|
|
# Auth (optional)
|
|
AUTH_ENABLED=false
|
|
FIREBASE_PROJECT_ID=
|
|
# Use one of the following to supply Firebase service account:
|
|
# FIREBASE_CREDENTIALS_JSON=
|
|
# FIREBASE_CREDENTIALS_FILE=/path/to/firebase.json
|