7f8d962edd7a8939d8ce594f5ff71fae105f95e6
Adds a README file explaining the project, oAuth management, and infisical setup. The oAuth management section describes the manual steps required to get a refresh token from Strava and how to use it. The Infisical setup section explains how to set up the Infisical vault with the required variables.
Strava-API
API used to communicate with my strava account, will be used as a display project
WIP and strava oAuth management
Right now the oAuth management is a bit manual, I need to get the refresh token manually from strava website, then store it in Infisical vault (or env variable for testing).
Steps to get refresh token
- Go to this URL (replace client_id with your strava app client id, redirect_uri with your redirect uri, and scope with the scopes you need):
- Authorize the application and you will be redirected to the redirect_uri with a code in the URL.
- Exchange the code for a refresh token by making a POST request to the Strava API:
POST https://www.strava.com/oauth/token
Content-Type: application/x-www-form-urlencoded
client_id=181987
client_secret=YOUR_CLIENT_SECRET
code=AUTHORIZATION_CODE
grant_type=authorization_code
- The response will contain the refresh token, which you can then store in your Infisical vault or as an environment variable.
The
REFRESH_TOKENis then used by the application to get new access tokens when needed. It's linked to your Strava account and allows the application to access your data.
Infisical setup
To use infisical you need to have the following variables in your vault (environment "dev"):
INFISICAL_CLIENT_SECRET: your infisical client secretINFISICAL_CLIENT_ID: your infisical client idINFISICAL_URL: Infisical url, mine ishttps://vault.louisemard.devINFISICAL_PROJECT_ID: Project where the secrets are stored, right now only one project is supported
Description