Refactor Strava integration to use user-provided creds

[backend] added alembic migration to add columns strava_client_secret and strava_client_id to users_integrations table
[backend] removed reference to STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_AUTH_CODE
[backend] added logic for Strava link to use id and secret given by user in the frontend
[backend] added Strava schema for Strava client logic
[backend] simplified Strava routes
[docker] removed reference to STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_AUTH_CODE
[docs] removed reference to STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_AUTH_CODE
[frontend] removed reference to STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET and STRAVA_AUTH_CODE
[frontend] added new generic modal ModalComponentNumberAndStringInput component
[frontend] added default value to input number on ModalComponentNumberInput component
[frontend] adjusted Strava calls to match optimized Strava backend routes
This commit is contained in:
João Vitória Silva
2025-05-03 16:52:17 +01:00
parent c48522b225
commit 7b360b7b61
20 changed files with 377 additions and 84 deletions

View File

@@ -54,9 +54,6 @@ ENV UID=1000 \
ALGORITHM="HS256" \
ACCESS_TOKEN_EXPIRE_MINUTES=15 \
REFRESH_TOKEN_EXPIRE_DAYS=7 \
STRAVA_CLIENT_ID="changeme" \
STRAVA_CLIENT_SECRET="changeme" \
STRAVA_AUTH_CODE="changeme" \
JAEGER_ENABLED="false" \
JAEGER_HOST="jaeger" \
JAEGER_PROTOCOL="http" \

View File

@@ -56,12 +56,6 @@ if [ -n "$ENDURAIN_HOST" ]; then
find /app/frontend/dist -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|MY_APP_ENDURAIN_HOST|${ENDURAIN_HOST}|g" '{}' +
fi
# Substitute MY_APP_STRAVA_CLIENT_ID with the value of STRAVA_CLIENT_ID
if [ -n "$STRAVA_CLIENT_ID" ]; then
echo_info_log "Substituting MY_APP_STRAVA_CLIENT_ID with $STRAVA_CLIENT_ID"
find /app/frontend/dist -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|MY_APP_STRAVA_CLIENT_ID|${STRAVA_CLIENT_ID}|g" '{}' +
fi
echo_info_log "Starting FastAPI with BEHIND_PROXY=$BEHIND_PROXY"
# Define the base command for starting the FastAPI server as an array