Force login prompt in Tesla Fleet (#130576)

This commit is contained in:
Brett Adams 2024-11-14 18:46:24 +10:00 committed by GitHub
parent 4200913d03
commit 2fda4c82de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,7 @@ class TeslaSystemImplementation(config_entry_oauth2_flow.LocalOAuth2Implementati
def extra_authorize_data(self) -> dict[str, Any]: def extra_authorize_data(self) -> dict[str, Any]:
"""Extra data that needs to be appended to the authorize url.""" """Extra data that needs to be appended to the authorize url."""
return { return {
"prompt": "login",
"scope": " ".join(SCOPES), "scope": " ".join(SCOPES),
"code_challenge": self.code_challenge, # PKCE "code_challenge": self.code_challenge, # PKCE
} }
@ -83,4 +84,4 @@ class TeslaUserImplementation(AuthImplementation):
@property @property
def extra_authorize_data(self) -> dict[str, Any]: def extra_authorize_data(self) -> dict[str, Any]:
"""Extra data that needs to be appended to the authorize url.""" """Extra data that needs to be appended to the authorize url."""
return {"scope": " ".join(SCOPES)} return {"prompt": "login", "scope": " ".join(SCOPES)}