forked from vhaudiquet/rhema-together
feat: sign in to Copilot, ChatGPT, and Mistral Vibe
Three provider kinds have a browser sign-in, but the add-provider dialog only accepted a pasted key. A per-account login record now runs the adapter's InteractiveLogin on the server, reports the instruction, URL, and code to the dialog, and stores the credential before the browser sees completion. The credential never reaches the client. The dialog gets a sign-in stage for flow kinds, with a link, a copyable code, and retry after failure. Closing the dialog cancels the flow. ChatGPT's callback lands on the server's loopback port, and the instruction names the port to forward.
This commit is contained in:
1 parent
369075a842
commit
f5087220da
12 files changed
+927
-23
No files matched your search
@@ -40,6 +40,14 @@ pub fn router(state: Shared) -> Router {
|
||||
"/provider-configs",
|
||||
get(settings::list_providers).post(settings::create_provider),
|
||||
)
|
||||
.route(
|
||||
"/provider-configs/login",
|
||||
post(settings::start_provider_login),
|
||||
)
|
||||
.route(
|
||||
"/provider-configs/login/{id}",
|
||||
get(settings::provider_login_status).delete(settings::cancel_provider_login),
|
||||
)
|
||||
.route("/provider-configs/{id}", delete(settings::delete_provider))
|
||||
.route(
|
||||
"/provider-configs/{id}/models",
|
||||
|
||||
Reference in new issue
Block a user