Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions backend/src/Hookline.Host/Endpoints/AuthEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public static void MapHooklineAuthEndpoints(this IEndpointRouteBuilder app)
group.MapGet("/bootstrap-state", async (UserService users) =>
{
var ownerExists = await users.OwnerExistsAsync();
var all = await users.ListAsync();
return Results.Ok(new { ownerExists, userCount = all.Count });
return Results.Ok(new { ownerExists });
});

// The BFF validates here, then mints the session cookie + identity assertion.
Expand Down
3 changes: 2 additions & 1 deletion backend/src/Hookline.Infrastructure/Auth/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public async Task BootstrapAsync(CancellationToken ct = default)
if (string.IsNullOrWhiteSpace(password))
{
password = GenerateBreakGlassPassword();
logger.LogWarning("BOOTSTRAP_ADMIN_PASSWORD (generated, capture now): {Password}", password);
Console.Error.WriteLine($"BOOTSTRAP_ADMIN_PASSWORD (generated, capture now): {password}");
logger.LogWarning("Generated bootstrap admin password — capture from stderr. It will not be shown again.");
}

db.Users.Add(new User
Expand Down
1 change: 0 additions & 1 deletion web/src/features/auth/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface Me {

export interface BootstrapState {
ownerExists: boolean;
userCount: number;
}

/** Current user, or null when unauthenticated (401 is not an error here). */
Expand Down
Loading