PHPackages                             zrobot/flarum-gitea-org-oauth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. zrobot/flarum-gitea-org-oauth

ActiveFlarum-extension[Authentication &amp; Authorization](/categories/authentication)

zrobot/flarum-gitea-org-oauth
=============================

Flarum FoF OAuth provider for logging in via Gitea, restricted to specific organizations.

v0.1.5(3mo ago)015↓50%MITPHP

Since Jan 26Pushed 3mo agoCompare

[ Source](https://github.com/Nicotinamide/flarum-gitea-org)[ Packagist](https://packagist.org/packages/zrobot/flarum-gitea-org-oauth)[ RSS](/packages/zrobot-flarum-gitea-org-oauth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

zrobot/flarum-gitea-org-oauth
=============================

[](#zrobotflarum-gitea-org-oauth)

A minimal Flarum extension that adds a **FoF OAuth** provider named `gitea_org`.

It lets users log in/register via **Gitea** and **restricts** access to users who belong to one (or more) allowed Gitea organizations.

Features
--------

[](#features)

- **Gitea OAuth Login**: Allow users to login/register via Gitea
- **Organization Restriction**: Only allow users from specific Gitea organizations
- **FoF Doorman Integration**: Automatically bypass invite codes for OAuth registration (when Doorman is installed)

Requirements
------------

[](#requirements)

- Flarum `^1.8`
- FriendsOfFlarum OAuth `^1.7`
- PHP 8.1+ (tested with PHP 8.3)

Install
-------

[](#install)

### Option A: Path repository (offline-friendly)

[](#option-a-path-repository-offline-friendly)

1. Copy this repo into your Flarum folder, e.g. `extensions/zrobot-gitea-org-oauth`
2. Add a path repository to `composer.json`:

```
"repositories": [
  { "type": "path", "url": "extensions/zrobot-gitea-org-oauth" }
]
```

3. Install:

```
cd /opt/flarum
composer require zrobot/flarum-gitea-org-oauth:"*"
php flarum cache:clear
```

### Option B: VCS repository (GitHub/Gitea)

[](#option-b-vcs-repository-githubgitea)

Add a VCS repository entry and require `dev-main`, or tag a release and require `^0.1`.

Gitea setup
-----------

[](#gitea-setup)

Create an **OAuth2 application** in Gitea:

- Redirect URI: `https://YOUR_FORUM_DOMAIN/auth/gitea_org`

Flarum admin setup
------------------

[](#flarum-admin-setup)

In **Admin → FoF OAuth → Providers → Gitea Org OAuth**:

- **Base URL**: `https://gitea.example.com`
- **Client ID / Client Secret**: from your Gitea OAuth app
- **Allowed organizations**: `orgA,orgB` (comma-separated, leave empty to allow all users)

Integration with FoF Doorman
----------------------------

[](#integration-with-fof-doorman)

If you have FoF Doorman installed, this extension automatically bypasses invite code requirements for Gitea OAuth registration:

- ✅ Normal registration requires an invite code (if Doorman is enabled)
- ✅ Gitea OAuth registration does NOT require an invite code
- ✅ Works automatically when both extensions are enabled

Notes
-----

[](#notes)

- This provider checks membership using `GET /api/v1/user/orgs`
- If a user is not in the allowed org list, login/registration is denied
- Leave "Allowed organizations" empty to allow all Gitea users (no org restriction)
- Doorman bypass is automatic and always enabled when Doorman is installed

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance80

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

107d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a391dd41822bdbe86bd5c315f721cc6d7665ae0445d9022211d471262902ae?d=identicon)[Nicotinamide](/maintainers/Nicotinamide)

---

Top Contributors

[![Nicotinamide](https://avatars.githubusercontent.com/u/46439401?v=4)](https://github.com/Nicotinamide "Nicotinamide (20 commits)")

---

Tags

oauthextensionflarumgitea

### Embed Badge

![Health badge](/badges/zrobot-flarum-gitea-org-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/zrobot-flarum-gitea-org-oauth/health.svg)](https://phpackages.com/packages/zrobot-flarum-gitea-org-oauth)
```

###  Alternatives

[fof/passport

The OAuth2 (and Laravel passport) compatible oauth extension

3013.3k](/packages/fof-passport)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
