From 387ef9e70ac8c0155823b18b091d31e60968c6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szak=C3=A1ts=20Alp=C3=A1r=20Zsolt?= Date: Fri, 19 Sep 2025 13:28:39 +0200 Subject: [PATCH] Redirects to Tesla authorization on missing token The application now redirects to the Tesla authorization endpoint when the access token is missing. This ensures the user is prompted to authorize the application. --- Source/ProofOfConcept/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ProofOfConcept/Program.cs b/Source/ProofOfConcept/Program.cs index 5952062..d8be6ce 100644 --- a/Source/ProofOfConcept/Program.cs +++ b/Source/ProofOfConcept/Program.cs @@ -285,7 +285,7 @@ if (app.Environment.IsDevelopment()) logger.LogCritical("User has access_token: {access_token} and refresh_token: {refresh_token}", access_token, refresh_token); if (String.IsNullOrEmpty(access_token)) - return Results.LocalRedirect("/Authorize"); + return Results.LocalRedirect("/Authorize?redirect=Tesla"); HttpClient client = httpClientFactory.CreateClient("InsecureClient"); client.BaseAddress = new Uri("https://tesla_command_proxy");