From 6aa7221ed5f0ac52179d492e5564b502cec3977d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szak=C3=A1ts=20Alp=C3=A1r=20Zsolt?= Date: Sat, 16 Aug 2025 22:30:22 +0200 Subject: [PATCH] Adds valid issuers for Tesla authentication Adds multiple valid issuers to the authentication configuration. This ensures compatibility with different Tesla authentication endpoints, including fleet and regional variations. --- Source/ProofOfConcept/Program.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/ProofOfConcept/Program.cs b/Source/ProofOfConcept/Program.cs index 437d867..1823b8b 100644 --- a/Source/ProofOfConcept/Program.cs +++ b/Source/ProofOfConcept/Program.cs @@ -55,6 +55,8 @@ builder.Services.AddAuthentication(o => // This must match exactly what you register at Tesla 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 o.Scope.Clear();