Skip to main content

onLoginRequest

plugin.llmProvider.onLoginRequest(callback: Function): void

Subscribe to incoming login requests (triggered by the UI login button). The plugin should run its authentication flow (e.g. OAuth) and then call sendReply(requestId, { authenticated: true }) or sendError().

Parameters

ParameterTypeRequiredDescription
callbackFunctionYes

Returns

void

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.llmProvider.onLoginRequest(/* Function */);
console.log(result);