fix(auth): make API-key setup and status truthful

This commit is contained in:
Federico Jaramillo Martinez
2026-07-18 08:28:03 +02:00
parent cc8f379143
commit c569a03f54
17 changed files with 300 additions and 45 deletions
+12
View File
@@ -105,12 +105,24 @@ export class AuthService {
return { accepted: true };
}
async startApiKeyLogin(providerId: string): Promise<OAuthFlowState> {
const provider = await this.requireApiKeyLoginProvider(providerId);
return this.authFlows.start({
providerId,
providerName: provider.name,
runtime: this.runtime,
authType: "api_key",
onComplete: () => this.emit({}, { operation: "login", providerId, authType: "api_key" }),
});
}
async startOAuthLogin(providerId: string): Promise<OAuthFlowState> {
const provider = await this.requireOAuthLoginProvider(providerId);
return this.authFlows.start({
providerId,
providerName: provider.name,
runtime: this.runtime,
authType: "oauth",
onComplete: () => this.emit({}, { operation: "login", providerId, authType: "oauth" }),
});
}