PHPackages                             markocupic/contao-oauth2-client - 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. markocupic/contao-oauth2-client

ActiveContao-bundle[Authentication &amp; Authorization](/categories/authentication)

markocupic/contao-oauth2-client
===============================

Contao OAuth2 Client

1.2.4(1mo ago)4580↑52.9%12GPL-3.0-or-laterPHPPHP ^8.2CI failing

Since Jan 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/markocupic/contao-oauth2-client)[ Packagist](https://packagist.org/packages/markocupic/contao-oauth2-client)[ RSS](/packages/markocupic-contao-oauth2-client/feed)WikiDiscussions 1.0 Synced today

READMEChangelogDependencies (36)Versions (28)Used By (2)

[![Logo Marko Cupic](docs/logo.png)](docs/logo.png)

Contao OAuth2 Client
====================

[](#contao-oauth2-client)

This extension serves as a base plugin for OAuth2 Login Bundles like [contao-github-login](https://github.com/markocupic/contao-github-login) or [contao-azure-login](https://github.com/markocupic/contao-azure-login) and contains a backend and frontend authenticator.

    demo.mp4    Follow these steps to create your custom oauth2-login plugin.
=============================================================

[](#follow-these-steps-to-create-your-custom-oauth2-login-plugin)

- Create a bundle and name it `vendorname/contao-***-login`
- In your composer require 'markocupic/contao-oauth2-client', the OAuth base extension `league/oauth2-github` an e.g. `league/oauth2-client`. Have a look at [knpuniversity/oauth2-client-bundle](https://github.com/knpuniversity/oauth2-client-bundle?tab=readme-ov-file#step-1-download-the-client-library)to find the client library of your choice.
- Create for your backend and frontend login the `***BackendClientFactory` class (e.g. GoogleBackendClientFactory) and `***FrontendClientFactory` class (e.g. GoogleFrontendClientFactory). Both classes have to extend `Markocupic\ContaoOAuth2Client\OAuth2\Client\AbstractClientFactory`.
- As **client name** you should choose something like this: `github_frontend` or `google_backend`. Use only letters and the underscore.
- Create your button generator class `ButtonGenerator` that has to implement `Markocupic\ContaoOAuth2Client\ButtonGenerator\ButtonGeneratorInterface`.
- If the Contao user is not identified by the claim `email`, you have to write your own token handler that has to implement `Markocupic\ContaoOAuth2Client\OAuth2\Token\TokenHandlerInterface`.
- Create your [`Extension`](https://github.com/markocupic/contao-github-login/blob/main/src/DependencyInjection/MarkocupicContaoGitHubLoginExtension.php)and [`Configuration`](https://github.com/markocupic/contao-github-login/blob/main/src/DependencyInjection/Configuration.php) class in the `src/DependencyInjection` folder.
- Create your button and store it in the templates/backend directory of your bundle.
- Create the frontend template `mod_login_***.html.twig` that extends `@MarkocupicContaoOAuth2Client/frontend/modules/_mod_login_oauth2_base.html.twig` and store it under `contao\templates\modules\mod_login_***.html.twig`.
- Create the login button component and store it in under `templates\component\_login_button.htl.twig`.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~32 days

Recently: every ~127 days

Total

28

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1525166?v=4)[Marko Cupic](/maintainers/markocupic)[@markocupic](https://github.com/markocupic)

---

Top Contributors

[![markocupic](https://avatars.githubusercontent.com/u/1525166?v=4)](https://github.com/markocupic "markocupic (46 commits)")

---

Tags

contaooauth2 wraper plugin

### Embed Badge

![Health badge](/badges/markocupic-contao-oauth2-client/health.svg)

```
[![Health](https://phpackages.com/badges/markocupic-contao-oauth2-client/health.svg)](https://phpackages.com/packages/markocupic-contao-oauth2-client)
```

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M739](/packages/sylius-sylius)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M204](/packages/sulu-sulu)[shopware/storefront

Storefront for Shopware

684.6M237](/packages/shopware-storefront)

PHPackages © 2026

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