Adds valid issuers for Tesla authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s

Adds multiple valid issuers to the authentication configuration.
This ensures compatibility with different Tesla authentication endpoints,
including fleet and regional variations.
This commit is contained in:
2025-08-16 22:30:22 +02:00
parent cab671193e
commit 6aa7221ed5

View File

@@ -56,6 +56,8 @@ builder.Services.AddAuthentication(o =>
// This must match exactly what you register at Tesla // This must match exactly what you register at Tesla
o.CallbackPath = new PathString("/token-exchange"); o.CallbackPath = new PathString("/token-exchange");
o.TokenValidationParameters.ValidIssuers = ["https://fleet-auth.tesla.com/oauth2/v3/nts", "https://auth.tesla.com/oauth2/v3", "https://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/nts"];
// Scopes you actually need // Scopes you actually need
o.Scope.Clear(); o.Scope.Clear();
o.Scope.Add("openid"); o.Scope.Add("openid");