Aller au contenu
EN English versionDemander une démo

Let members link their Forgejo account

For an organisation administrator. Procedure connector.forge_account.forgejo-oauth, version 1, reviewed 2026-11-12 against the vendor’s own pages. It applies to the connector type forge_account/forgejo-oauth.

It ships with the platform. In the console it opens with How to set this up, beside the form that adds the connector and on the connector’s settings.

Addresses are written <api_url>, <public_url> and <org> here: the console shows the same text with your deployment’s own.

  • A Forgejo administrator (for an instance-wide application) or the owner of an organisation on it.
  • Forgejo is self-hosted: its members usually sign in to it through the same identity provider as the platform. Linking proves which Forgejo account is theirs, by its numeric user id.
  • The access token is used for one read of the member’s user and dropped.
  1. Site administration, Integrations, Applications (or the organisation’s Settings, Applications), Create a new OAuth2 application.
  2. Redirect URIs: <api_url>/api/v1/auth/linked-accounts/callback. Keep Confidential client ticked.
  3. Create application, copy the Client ID and the Client secret (shown once).

The platform asks for read:user only: it reads the member’s own profile, nothing of their repositories or organisations.

  1. Administration, Connectors, Declare: capability Member accounts, type Forgejo sign-in.
  2. base_url: the instance’s address, https://forge.example (https only).
  3. client_id: the Client ID. client_secret: the Client secret, in the password field.
  4. Tick open the hosts in the egress allowlist, or open the instance’s host yourself.

Open My account, Linked accounts, Link next to Forgejo. After signing in at Forgejo you come back to the page and the account shows with a Verified badge and your Forgejo login.

  • Forgejo says the redirect URI is not registered: it differs from <api_url>/api/v1/auth/linked-accounts/callback.
  • link_error=forge_refused after consenting: wrong Client secret, or the application was regenerated.
  • link_error=instance_unusable: the connector’s base_url is not https, or its secret cannot be read.
  • link_error=taken: that Forgejo account is already linked to another member of the organisation.
  • A timeout: open the instance’s host in the egress allowlist.
Field What to put in it
base_url your Forgejo’s address, https://forge.example
client_id the OAuth2 application’s Client ID
client_secret the OAuth2 application’s Client secret, typed once