Skip to content

Commit

Permalink
Clean up and added comment about S2S auth
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Nov 25, 2024
1 parent 993421c commit 2d890e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Todo.Api/Users/UsersApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public static RouteGroupBuilder MapUsers(this IEndpointRouteBuilder routes)

group.WithTags("Users");

// TODO: Add service to service auth between the BFF and this API

group.WithParameterValidation(typeof(ExternalUserInfo));

group.MapIdentityApi<TodoUser>();
Expand Down
4 changes: 2 additions & 2 deletions Todo.Web/Server/Authentication/ExternalProviders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ private async Task<string[]> GetProviderNamesAsyncCore()
continue;
}

providerNames ??= new();
providerNames ??= [];
providerNames.Add(s.Name);
}

return providerNames?.ToArray() ?? Array.Empty<string>();
return providerNames?.ToArray() ?? [];
}
}
3 changes: 1 addition & 2 deletions Todo.Web/Server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"Yarp": "Warning"
}
},
"AllowedHosts": "*",
"TodoApiUrl": "https://localhost:5001"
"AllowedHosts": "*"
}

0 comments on commit 2d890e8

Please sign in to comment.