Don't exchange SSO token for Chinese accounts

Addresses #2378
This commit is contained in:
Adrian Kumpf
2022-01-26 18:03:23 +01:00
parent 33c644020e
commit 672e4e55cf
2 changed files with 1 additions and 42 deletions

View File

@@ -2,7 +2,6 @@ defmodule TeslaApi.Auth.Refresh do
import TeslaApi.Auth, only: [post: 2]
alias TeslaApi.{Auth, Error}
alias TeslaApi.Auth.OwnerApi
@web_client_id TeslaApi.Auth.web_client_id()
@@ -26,13 +25,7 @@ defmodule TeslaApi.Auth.Refresh do
created_at: body["created_at"]
}
case Auth.region(auth) do
:chinese ->
OwnerApi.exchange_sso_token(auth)
_other ->
{:ok, auth}
end
{:ok, auth}
error ->
Error.into(error, :token_refresh)