fix(bootstrap): create OAuth client when Zitadel is already running
Some checks failed
BotServer CI / build (push) Failing after 3m20s
Some checks failed
BotServer CI / build (push) Failing after 3m20s
- Added OAuth client creation to the 'already running' branch - Previously, OAuth client was only created when Zitadel was started - This fixes the issue where OAuth client wasn't created on subsequent runs Fixes the OAuth client creation issue discovered during testing.
This commit is contained in:
parent
2a6c599c75
commit
8016caa790
1 changed files with 10 additions and 0 deletions
|
|
@ -176,6 +176,16 @@ impl BootstrapManager {
|
|||
|
||||
if directory_already_running {
|
||||
info!("Zitadel/Directory service is already running");
|
||||
|
||||
// Create OAuth client if config doesn't exist (even when already running)
|
||||
let config_path = self.stack_dir("conf/system/directory_config.json");
|
||||
if !config_path.exists() {
|
||||
info!("Creating OAuth client for Directory service...");
|
||||
match crate::core::package_manager::setup_directory().await {
|
||||
Ok(_) => info!("OAuth client created successfully"),
|
||||
Err(e) => warn!("Failed to create OAuth client: {}", e),
|
||||
}
|
||||
}
|
||||
} else {
|
||||
info!("Starting Zitadel/Directory service...");
|
||||
match pm.start("directory") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue