PHPackages                             vinkas/discourse-php - 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. vinkas/discourse-php

Abandoned → [vinkas/discourse](/?search=vinkas%2Fdiscourse)Library

vinkas/discourse-php
====================

PHP library to authenticate your forum using Discourse Connect

v2.1.0(1y ago)86.5k7MITPHPPHP ^8.1

Since Oct 5Pushed 1y ago3 watchersCompare

[ Source](https://github.com/vinkashq/discourse-php)[ Packagist](https://packagist.org/packages/vinkas/discourse-php)[ RSS](/packages/vinkas-discourse-php/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (5)Dependencies (3)Versions (8)Used By (0)

discourse-php
=============

[](#discourse-php)

[![Tests](https://github.com/vinkashq/discourse-php/actions/workflows/tests.yml/badge.svg)](https://github.com/vinkashq/discourse-php/actions/workflows/tests.yml) [![Packagist Version](https://camo.githubusercontent.com/68265ca7c490036548d558749d68cc8772a3100591037c2c9110d0758073163a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76696e6b61732f646973636f757273653f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d303030303030266c6162656c3d76657273696f6e266c6162656c436f6c6f723d64396530663326636f6c6f723d663238643161)](https://packagist.org/packages/vinkas/discourse)

PHP library to authenticate your forum using Discourse Connect

Installation
------------

[](#installation)

The package [`vinkas/discourse`](https://packagist.org/packages/vinkas/discourse) can be installed using composer via packagist.

```
composer require vinkas/discourse

```

Documentation
-------------

[](#documentation)

### Creating a Discourse client

[](#creating-a-discourse-client)

```
$discourse = new Vinkas\Discourse\Client('discourse.example.com', true);  // set true if ssl enabled
```

### Discourse Connect

[](#discourse-connect)

```
$payload = $_GET['sso'];
$signature = $_GET['sig'];

$connect = $discourse->connect('SECRET', $payload, $signature);

if (!($connect->isValid())) {
    header("HTTP/1.1 403 Forbidden");
    echo("Bad Discourse Connect request");
    die();
}

$userParams = array(
    'external_id' => 'USER_ID',
    'email'     => 'EMAIL_ADDRESS',
    'username' => 'USERNAME',  // optional
    'name'     => 'FULL_NAME'  // optional
    // for more available fields https://meta.discourse.org/t/13045
);

$url = $connect->getResponseUrl($userParams)
header('Location: ' . $url);
exit(0);

```

Visit  for more details about Discourse Connect.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~495 days

Recently: every ~740 days

Total

7

Last Release

537d ago

Major Versions

v1.0.4 → v2.0.02024-11-11

PHP version history (2 changes)v1.0.0PHP &gt;=5.6.4

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/75502944bc293e8aa5b6629e8ac575f710c37e7c7b30663538416c520c01487b?d=identicon)[vinothkannans](/maintainers/vinothkannans)

---

Top Contributors

[![vinothkannans](https://avatars.githubusercontent.com/u/9372109?v=4)](https://github.com/vinothkannans "vinothkannans (36 commits)")[![BenjaminP7](https://avatars.githubusercontent.com/u/1512010?v=4)](https://github.com/BenjaminP7 "BenjaminP7 (4 commits)")[![pnoeric](https://avatars.githubusercontent.com/u/447652?v=4)](https://github.com/pnoeric "pnoeric (1 commits)")[![rafaelgou](https://avatars.githubusercontent.com/u/196133?v=4)](https://github.com/rafaelgou "rafaelgou (1 commits)")

---

Tags

discoursediscourse-connectphpphp-librarySSOconnectdiscoursevinkas

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vinkas-discourse-php/health.svg)

```
[![Health](https://phpackages.com/badges/vinkas-discourse-php/health.svg)](https://phpackages.com/packages/vinkas-discourse-php)
```

###  Alternatives

[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[onelogin/php-saml

PHP SAML Toolkit

1.3k44.0M107](/packages/onelogin-php-saml)[spinen/laravel-discourse-sso

Integrate Discourse SSO into Laravel.

4897.8k](/packages/spinen-laravel-discourse-sso)[myoutdeskllc/salesforce-php

salesforce library for php8+

1560.8k](/packages/myoutdeskllc-salesforce-php)[sammaye/yii2-discourse-sso

A set of tools for Discourse unicorns.

121.2k](/packages/sammaye-yii2-discourse-sso)

PHPackages © 2026

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