Commit Graph

21 Commits

Author SHA1 Message Date
jlestel
c8fed077bb Fix 401 on direct Fleet API calls (#4095)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

* fix: rebound variable issuer_url

* fix: compilation warning on the issuer_url variable

* fix: format code

* fix: issuer_url assignments

* feat: customize polling intervals

* typo

* update doc

* typo

* add online interval

* add POLLING_ONLINE_INTERVAL

* format

* add minimum interval

* Add minimum on fetch parameter

* typo

* format

* respect immediate fetch, add charging interval

* add log level

* Respect log_level

* format

* use LOG_LEVEL env var to facilitate debug

* revert on log_level

* format

* typo

* format again

* revert on default error intervals

* Add a note in MD about polling settings

* not let the user set intervals via env variables shorter than our defaults

* Fix 401 on direct Fleet API

* try to fix in prod context

* log test

* up

* up

* format

* revert on log

* Update refresh.ex

---------

Co-authored-by: Julien <julien@citio.digital>
2024-07-27 14:06:57 +02:00
jlestel
4313409323 feat: Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3903)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

* fix: rebound variable issuer_url

* fix: compilation warning on the issuer_url variable

* fix: format code

* fix: issuer_url assignments

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-27 11:03:23 +02:00
Jakob Lichterfeld
10995a3ce5 Revert "Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)"
This reverts commit 263f207dc9.
2024-05-20 14:07:26 +02:00
jlestel
263f207dc9 Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-20 13:11:13 +02:00
Adrian Kumpf
b6a5219090 Don't exchange SSO token for Chinese accounts
Addresses #2378
2022-01-26 18:03:56 +01:00
Adrian Kumpf
8aa772872a Remove support for logins with username/password 2022-01-21 19:09:32 +01:00
Howard Su
811dac1d08 Fix MFA for Chinese accounts (#2234) 2022-01-01 18:04:13 +01:00
Adrian Kumpf
0a127f60a9 Show error message if access is denied
Related to #2159
2021-11-17 17:39:28 +01:00
Adrian Kumpf
9c9564ecc7 Exchange Chinese SSO tokens 2021-10-31 16:56:36 +01:00
Adrian Kumpf
00ce5c39ce Use SSO Access Tokens 2021-09-30 13:45:02 +02:00
Adrian Kumpf
7f661a5a25 Update error message of recaptcha 2021-09-10 11:11:14 +02:00
Adrian Kumpf
373a478365 Update website dependencies 2021-08-30 17:23:34 +02:00
Adrian Kumpf
e4234b4f25 Split auth code into smaller modules 2021-08-30 16:16:21 +02:00
Adrian Kumpf
b1991f541e Add support for v3 API tokens in China (#1300)
* Add support for v3 API tokens in China

* Add support for refreshing tokens in China

* Log auth requests without debug output

* Log failed requests to the Owner API
2021-02-06 17:28:29 +01:00
Adrian Kumpf
9ca3830f04 Refresh access tokens with new auth endpoint 2021-01-30 19:20:49 +01:00
Adrian Kumpf
b27276b7db Handle unexpected MFA errors 2021-01-03 21:41:32 +01:00
Adrian Kumpf
d825fc1723 Allow to use the legacy authentication API 2020-12-29 15:05:38 +01:00
Adrian Kumpf
bb7df800a5 Allow to enter MFA codes 2020-12-20 22:18:52 +01:00
Adrian Kumpf
bf37134995 Small refactoring 2020-12-19 21:54:36 +01:00
Adrian Kumpf
42ac182b97 Use Tesla client with custom auth middleware 2020-12-19 21:08:10 +01:00
Adrian Kumpf
df6b96b1c8 Implement MFA flow 2020-12-19 21:07:55 +01:00