feat: allow Fleet API users to change client_id (#3984)

Co-authored-by: Julien <julien@citio.digital>
This commit is contained in:
jlestel
2024-06-26 10:58:31 +02:00
committed by GitHub
parent 9df4e7c932
commit 2c4639e32d
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ defmodule TeslaApi.Auth do
@web_client_id "ownerapi"
@redirect_uri "https://auth.tesla.com/void/callback"
def web_client_id, do: @web_client_id
def web_client_id, do: System.get_env("TESLA_AUTH_CLIENT_ID") || @web_client_id
def redirect_uri, do: @redirect_uri
@default_headers [
@@ -7,7 +7,7 @@ sidebar_label: Environment Variables
TeslaMate accepts the following environment variables for runtime configuration:
| Variable Name | Description | Default Value |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| **ENCRYPTION_KEY** | A key used to encrypt the Tesla API tokens (**required**) | |
| **DATABASE_USER** | Username (**required**) | |
| **DATABASE_PASS** | User password (**required**) | |
@@ -37,10 +37,11 @@ TeslaMate accepts the following environment variables for runtime configuration:
| **IMPORT_DIR** | The path of the directory for the import of data (e.g. TeslaFi) | ./import |
| **TZ** | Used to establish the local time zone, e.g. to use the local time in logs. See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | |
| **DEFAULT_GEOFENCE** | The default GEOFENCE to send via GEOFENCE if car not in geofence. Overrides the default of "" which will delete any retained value. | "" (no quotes) |
| **TESLAFI_IMPORT_VEHICLE_ID** | The default Vehicle ID used when importing from TeslaFi. If it is not defined and the import source does not contain the data, 1 is used.
| **TESLAFI_IMPORT_VEHICLE_ID** | The default Vehicle ID used when importing from TeslaFi. If it is not defined and the import source does not contain the data, 1 is used. | |
| **TESLA_API_HOST** | Hostname of the Tesla API | https://owner-api.teslamotors.com (or for chinese: https://owner-api.vn.cloud.tesla.cn) |
| **TESLA_AUTH_HOST** | Hostname of the Tesla authentication API | https://auth.tesla.com |
| **TESLA_AUTH_PATH** | The Tesla authentication path | /oauth2/v3 |
| **TESLA_AUTH_CLIENT_ID** | Client ID of the application registered on [developer.tesla.com](https://developer.tesla.com) | ownerapi |
| **TESLA_WSS_HOST** | Hostname of the Tesla streaming | wss://streaming.vn.teslamotors.com (or for chinese: wss://streaming.vn.cloud.tesla.cn) |
| **TESLA_WSS_TLS_ACCEPT_INVALID_CERTS** | Accepts invalid certificates on TESLA_WSS_HOST if `true` | |
| **TESLA_WSS_USE_VIN** | Use the `vin` field instead of `vid` to connect stream if `true` | |