AgentConnect
Sign-in & integrations

Sign-in

Set up Logto sign-in for AgentConnect OSS using Logto Cloud, an external Logto OSS instance, or the bundled local overlay, with social providers or SSO.

AgentConnect uses Logto for human sign-in, renewable browser tokens, and linked social identities. AgentConnect still manages organizations, roles, agent visibility, session visibility, and repository permissions.

The base Compose stack runs without authentication for local evaluation. When you're ready for real user accounts, pick one of these options:

PathUse it for
Bundled Logto OSS overlayLocal evaluation without DNS or TLS
Logto CloudHosted production sign-in
External Logto OSSSelf-managed production sign-in

Local sign-in with the bundled overlay

1. Start AgentConnect and Logto

From the AgentConnect repository:

docker compose -f compose.yaml -f compose.logto.yaml up -d

Open:

Complete Logto's initial Console onboarding if this is a fresh database.

2. Create the Management API application

In Logto Console → Applications, create a Machine-to-machine application. Assign it the built-in Logto Management API access role, then copy its App ID and App Secret.

Open Setup, choose Continue setup, and enter those credentials under Connect Logto. AgentConnect stores the secret as a write-only deployment secret.

The expected Management API resource is:

https://default.logto.app/api

See Logto's Management API guide for details on creating the application and role.

3. Choose the first sign-in provider

Setup creates or updates the AgentConnect SPA, its redirects, the selected social connector, the sign-in experience, and the ADMIN role.

ProviderLocal bootstrap
GoogleRecommended locally. Create the Web OAuth client with the exact bare localhost values shown.
GitHubSetup creates one App for both repository integration and sign-in.
SlackRequires HTTPS origins for Logto, Web, Control Plane, and Relay.
Single sign-onYour organization's OIDC or SAML identity provider. See Single sign-on.

Google is the quickest way to get started locally. Paste its client ID and secret into Setup and choose Save Google OAuth and configure Logto. The initial provider picker disables Slack until all required public origins use HTTPS.

4. Claim the first administrator

After Setup finishes configuring the provider:

  1. Choose Sign in with Logto.
  2. Complete sign-in with the configured provider.
  3. Setup assigns that first user the ADMIN role.
  4. Sign in once more so the refreshed token includes the role.

Setup then opens the full deployment settings. Restart the affected services after making changes:

docker compose restart control-plane relay web

The bundled overlay is for local evaluation only. It uses the SPA's ID token until you configure an API Resource, so switch to the production setup below before exposing AgentConnect to a network.

Production sign-in

A production browser session requires final HTTPS origins and one custom API Resource. Set the AgentConnect origins in compose.env before configuring provider Apps:

AGENTCONNECT_PUBLIC_WEB_URL=https://app.agentconnect.example
AGENTCONNECT_PUBLIC_CP_URL=https://api.agentconnect.example
AGENTCONNECT_PUBLIC_RELAY_URL=https://relay.agentconnect.example
AGENTCONNECT_RELAY_DAEMON_URL=wss://relay.agentconnect.example

Then choose Logto Cloud or an external Logto OSS deployment.

Logto Cloud

Logto Cloud is the fastest hosted option:

  1. Create or select a tenant in Logto Cloud.
  2. Choose a plan that includes at least one custom API Resource. The Free plan doesn't currently include custom API Resources, so production AgentConnect sign-in requires Pro or higher. See Logto pricing.
  3. Copy the tenant's canonical https://<tenant-id>.logto.app endpoint.
  4. Add the Logto service URLs to compose.env:
LOGTO_ENDPOINT=https://tenant-id.logto.app
LOGTO_ADMIN_ENDPOINT=https://cloud.logto.io
OIDC_ISSUER=https://tenant-id.logto.app/oidc
LOGTO_MGMT_ENDPOINT=https://tenant-id.logto.app

If you use a custom domain for sign-in, set it in LOGTO_ENDPOINT and OIDC_ISSUER. Keep LOGTO_MGMT_ENDPOINT on the canonical logto.app tenant domain, because Logto Cloud doesn't accept Management API token requests over a custom domain.

In Logto Console, create a Machine-to-machine application and assign the built-in Logto Management API access role. During Setup bootstrap, set the Management API resource to:

https://tenant-id.logto.app/api

External Logto OSS

Run Logto OSS behind its final HTTPS origins, then add them to compose.env:

LOGTO_ENDPOINT=https://login.agentconnect.example
LOGTO_ADMIN_ENDPOINT=https://admin.agentconnect.example
OIDC_ISSUER=https://login.agentconnect.example/oidc
LOGTO_MGMT_ENDPOINT=https://login.agentconnect.example

Create a Machine-to-machine application, assign Logto Management API access, and keep the default Management API resource:

https://default.logto.app/api

Connect Setup Server

Start the base stack with your environment file:

docker compose --env-file compose.env up -d

Open Setup, choose Continue setup, and enter the M2M App ID, App Secret, and Management API resource for your Logto deployment. Setup verifies the credentials, creates or adopts the browser SPA, and configures the supported social connectors.

Choose your first sign-in provider, sign in, and sign in once more after Setup assigns the ADMIN role. You can then configure the browser API Resource, displayed sign-in methods, provider Apps, and their credentials in Setup.

Create the Control Plane API Resource

A production browser session needs a renewable access token whose audience identifies the AgentConnect Control Plane. In Logto Console → API resources, create one custom API Resource:

SettingExample
NameAgentConnect Control Plane
API identifierhttps://api.agentconnect.example

The identifier must be an absolute URI, though it doesn't need to resolve to the Control Plane. AgentConnect handles its own authorization, so you don't need to add Logto permissions or user roles to this resource.

In Setup:

  1. Open Logto → Edit.
  2. Enter the identifier as Browser API resource.
  3. Save, choose Apply expected settings, and restart Control Plane and Web.

The saved value acts as both the browser token resource and the Control Plane audience. Logto requires the requested resource to match its registered API identifier exactly. See Protect global API resources.

Without an API Resource, AgentConnect falls back to the SPA ID token. That's fine for the local overlay, but not for production because the browser flow doesn't renew that fallback token.

Social providers

Setup manages the Logto connectors for GitHub, Google, Slack, and Microsoft from their respective provider cards:

  • GitHub: One AgentConnect GitHub App can handle both repository integration and sign-in.
  • Google: Create the OAuth client manually using the exact origin and callback values Setup displays (the bundled local setup uses bare localhost).
  • Slack: One deployment App can handle workspace installation and a separate Slack OIDC sign-in flow. All public origins must use HTTPS.
  • Microsoft: A multi-tenant Microsoft Entra application signs people in with their work or school account. When you add its home tenant, it also serves as the Microsoft Teams deployment app.

The Lark and Feishu cards configure regional tenant Apps for trusted-workspace bot admission. They don't automatically add Lark or Feishu as Logto sign-in methods. See Lark and Feishu tenant Apps.

Google sign-in

Google is the simplest provider for local sign-in. The bundled topology uses bare localhost, which Google accepts for local Web OAuth clients.

  1. Choose Google during Setup bootstrap, or open the Google card later.
  2. Create a Web OAuth client in Google Auth Platform using the exact origins and redirect URIs shown by Setup.
  3. Save the client ID and secret, then restart Control Plane and Web.

Setup creates or updates the matching Logto connector and can verify it. Compare the displayed Google origins and redirect URIs manually.

Single sign-on

People can sign in through your organization's identity provider over OIDC or SAML, either alongside social providers or instead of them. Choose Single sign-on (OIDC or SAML) as the first sign-in provider during Setup bootstrap, or open the Single sign-on card later.

  1. Choose the protocol and enter the Name on the sign-in button. The console displays it as Continue with name (defaults to SSO).

  2. Choose Create SSO connector. Logto creates the connector, and Setup displays the values to register with your identity provider:

    ProtocolRegister with the identity provider
    OIDCRedirect URI https://login.agentconnect.example/callback/<connector-id>
    SAMLACS URL https://login.agentconnect.example/api/authn/single-sign-on/saml/<connector-id> and SP entity ID https://login.agentconnect.example/enterprise-sso/<connector-id>
  3. Enter your identity provider's settings:

    • OIDC: The issuer URL, client ID, and client secret. openid profile email are always requested; only add extra scopes if your provider requires them to return an email address.
    • SAML: The metadata URL or metadata XML, plus the attribute containing the email address if it isn't email.
  4. Enter at least one email domain, such as example.com. Logto offers this connector only for addresses in those domains, so Setup won't save the connector without at least one.

  5. Choose who joins automatically under New members, and select the Organization they join.

  6. Choose Save SSO and configure Logto, then restart Control Plane and Web.

The AgentConnect sign-in page places the SSO button above the social providers and sends users straight to your identity provider. It marks the browser's last-used method with Last used. When SSO is the only sign-in method, Setup's Sign in with Logto uses it too, so you can claim the first administrator through SSO.

For Microsoft Entra ID, register a single-tenant Web application with the redirect URI, create a client secret, and set the issuer to https://login.microsoftonline.com/<tenant-id>/v2.0. Add the email optional claim to the ID token so sign-ins include an email address.

Email addresses

Logto links an SSO sign-in to an existing account with the same email address, so someone who previously signed in with a social provider keeps the same AgentConnect user. Only list domains whose addresses your identity provider controls.

An OIDC provider can mark each email address as verified or unverified. If it doesn't include a verification status, Trust email addresses when the identity provider does not say whether they are verified controls whether to accept it (enabled by default). If the provider explicitly marks an address as unverified, Logto always rejects it regardless of this setting.

New members

Signing in creates a user account, but doesn't automatically add the person to an organization. New members controls whether people who sign in through the connector also join an organization:

ChoiceWho joins
Anyone who signs in with SSO (default)Every account whose address is on one of the connector's email domains
Invite onlyNobody; an Owner adds members or shares an invite link

Organization sets which organization they join. The only organization works when your deployment has a single organization. If you have zero or multiple organizations, nobody is added automatically until you pick one from the list.

New members and Organization in Setup's single sign-on form

Users join as a Collaborator, once, when they sign in. Anyone an Owner later removes won't be re-added automatically, and existing members keep their current role. Domains are matched exactly, so list eu.example.com separately if people have addresses there.

In the console, that organization shows this setting as read-only under Settings → Members → New members, labeled Set by the deployment.

The read-only New members card, marked Set by the deployment

A connector configured before this option existed defaults to Anyone who signs in with SSO. After upgrading, a deployment with a single organization starts adding accounts on the connector's domains to that organization as they sign in. To keep invitations required, select Invite only, save, and restart Control Plane.

Change or remove the connector

Saving updated settings keeps the existing connector and its URLs. Changing the protocol replaces the connector, so you'll need to register the new URLs with your identity provider. Users then sign in again and match back to their existing accounts by email address.

Remove SSO sign-in asks for confirmation, then deletes the connector in Logto along with the SSO sign-in identities created through it. User accounts remain, and users can sign in with another method. Setup requires at least one active sign-in method, so configure a social provider first if SSO is your only one.

Identity providers on a private network

Logto blocks requests to private network addresses by default. If your issuer, token endpoint, or SAML metadata URL resolves to a private address, allow that address or CIDR range in Logto. With the bundled overlay, set it in compose.env and recreate the Logto container:

LOGTO_SSRF_ALLOWED_ADDRESSES=192.0.2.10/32

For an external Logto OSS deployment, set Logto's SSRF_ALLOWED_ADDRESSES environment variable to the same value.

Let organizations set up their own SSO

The deployment-wide connector above is meant for a single company. If multiple organizations share your deployment, you can instead let each organization verify its own domains and connect its own identity provider (see Single sign-on). A deployment uses one mode or the other, never both.

  1. If the deployment already has a connector, choose Remove SSO sign-in first.
  2. In Setup, under Deployment options, check Let organizations set up their own SSO and choose Save options. Console sign-in must already be configured. Saving also updates Logto automatically: Setup installs the access-token script that tells AgentConnect which connection a session used, and makes each user's email address read-only in Logto's account center since domain rules depend on it. If the Logto card later shows Update required, choose Apply expected settings.
  3. Restart Control Plane and Web.

Requirements:

  • A Logto release newer than 1.46.0. Organization SSO requires Logto to link sign-ins to an existing account only within the connection's domains and to bind each identity to the connection that created it. Logto 1.46.0 and earlier, as well as Logto Cloud, don't support both behaviors, so keep the deployment-wide connector in those environments.
  • Public DNS access from the Control Plane, which looks up each organization's TXT record directly.

If an organization locks itself out (for example, when its identity provider breaks while SSO is enforced), a user with the ADMIN role can recover it from a signed-in console session (API keys aren't accepted): POST /api/v1/admin/orgs/{orgId}/sso/connection/stop-enforcing, POST /api/v1/admin/orgs/{orgId}/sso/connection/deactivate, and DELETE /api/v1/admin/sso/domains/{id} to release a domain an organization no longer controls.

Lark and Feishu identities

Lark and Feishu session access is an advanced self-hosted setup. It requires both:

  • A Logto social identity that preserves the provider's cross-App union_id
  • The matching regional Login App configured in Setup

The Login App and every admitted AgentConnect bot App must belong to the same provider workspace. AgentConnect uses union_id to recognize the same person across those Apps, then uses the installed bot's credentials to check current chat membership. It doesn't use a user's provider token or the Login App credential for that check.

Setup doesn't create the Lark or Feishu Logto connector. If you enable either sign-in method, confirm that its Logto identity record includes union_id (an App-scoped open_id isn't sufficient). See Lark / Feishu for bot permissions and the installation flow.

To let people add or remove providers under Your profile → Sign-in methods:

  1. In Logto Console → Sign-in & account → Account center, enable the Account API.
  2. Set Social identities to Edit.
  3. Keep each provider's normal Logto callback and the AgentConnect callback shown by Setup.

Logto may require an ownership verification code before changing a social identity:

ProviderEmail verification for linking
GitHubNot normally required
GoogleNot normally required
SlackRequired

If the flow shows Send code, configure a Logto email connector that supports the UserPermissionValidation template. The user also needs a verified primary email; an address stored only inside a social identity isn't enough.

The bundled Logto OSS deployment doesn't include an email delivery service. Connect SMTP, HTTP, or another supported email provider when you enable flows that send verification codes.

Logto documents this identity-editing behavior in Account settings by Account API.

Verify the setup

  1. Sign in to AgentConnect in a private browser window.
  2. Confirm Setup opens only for a user with the ADMIN role.
  3. Open Your profile → Sign-in methods and link a second configured provider.
  4. Confirm AgentConnect continues calling the Control Plane after the original access token expires.
  5. In Setup, run each available provider check and manually compare any callbacks marked as unverifiable.

An immediate 401 usually means the browser API resource and Control Plane audience don't match. A provider button that lands on a Logto error page usually means the connector is missing from the sign-in experience. An SSO sign-in that fails after the identity provider's page usually means the client secret or a registered URL doesn't match. Check Logto Console → Audit logs for the provider's response.

Until Logto sign-in is bootstrapped in Setup, keep the local no-auth stack bound to loopback.

How is this guide?

On this page

How is this guide?