refactor: simplify provider oauth prompts

This commit is contained in:
Peter Steinberger
2026-04-11 00:11:08 +01:00
parent 73d054b764
commit 71efba043c

View File

@@ -25,12 +25,10 @@ export function createVpsAwareOAuthHandlers(params: {
if (params.isRemote) {
params.spin.stop("OAuth URL ready");
params.runtime.log(`\nOpen this URL in your LOCAL browser:\n\n${url}\n`);
manualCodePromise = params.prompter
.text({
message: manualPromptMessage,
validate: validateRequiredInput,
})
.then((value) => String(value));
manualCodePromise = params.prompter.text({
message: manualPromptMessage,
validate: validateRequiredInput,
});
return;
}
@@ -47,7 +45,7 @@ export function createVpsAwareOAuthHandlers(params: {
placeholder: prompt.placeholder,
validate: validateRequiredInput,
});
return String(code);
return code;
},
};
}