diff --git a/lib/registry/src/wasmer_env.rs b/lib/registry/src/wasmer_env.rs index b3fcfea2fd9..110d434fdee 100644 --- a/lib/registry/src/wasmer_env.rs +++ b/lib/registry/src/wasmer_env.rs @@ -88,8 +88,10 @@ impl WasmerEnv { // Fall back to the config file let config = self.config().ok()?; - let login = config.registry.current_login()?; - Some(login.token.clone()) + let registry_endpoint = self.registry_endpoint().ok()?; + config + .registry + .get_login_token_for_registry(registry_endpoint.as_str()) } }