Redirects to Tesla authorization on missing token
All checks were successful
Build, Push and Run Container / build (push) Successful in 53s

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.
This commit is contained in:
2025-09-19 13:28:39 +02:00
parent 22df381755
commit 387ef9e70a

View File

@@ -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");