Uses local redirect for authorization.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Changes from `RedirectToRoute` to `LocalRedirect` for the authorization endpoint to improve security and ensure the redirect stays within the application's domain.
This commit is contained in:
@@ -238,7 +238,7 @@ if (app.Environment.IsDevelopment())
|
|||||||
logger.LogCritical("User has access_token: {access_token} and refresh_token: {refresh_token}", access_token, refresh_token);
|
logger.LogCritical("User has access_token: {access_token} and refresh_token: {refresh_token}", access_token, refresh_token);
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(access_token))
|
if (String.IsNullOrEmpty(access_token))
|
||||||
return Results.RedirectToRoute("/Authorize");
|
return Results.LocalRedirect("/Authorize");
|
||||||
|
|
||||||
HttpClient client = httpClientFactory.CreateClient();
|
HttpClient client = httpClientFactory.CreateClient();
|
||||||
client.BaseAddress = new Uri("tesla_command_proxy");
|
client.BaseAddress = new Uri("tesla_command_proxy");
|
||||||
|
|||||||
Reference in New Issue
Block a user