PHPackages                             mattiabasone/mc-auth - 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. mattiabasone/mc-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mattiabasone/mc-auth
====================

Minecraft PHP Authentication for Mojang Yggdrasil authentication scheme.

2.0(9y ago)313478[1 issues](https://github.com/mattiabasone/MCAuth/issues)BSD-4-ClausePHPPHP &gt;=7.0

Since Feb 3Pushed 9y ago6 watchersCompare

[ Source](https://github.com/mattiabasone/MCAuth)[ Packagist](https://packagist.org/packages/mattiabasone/mc-auth)[ Docs](https://github.com/mattiabasone/MCAuth)[ RSS](/packages/mattiabasone-mc-auth/feed)WikiDiscussions composer Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

MCAuth
======

[](#mcauth)

Minecraft PHP Authentication for Mojang Yggdrasil () authentication scheme

### Installation

[](#installation)

```
composer require mattiabasone/mc-auth
```

### Example:

[](#example)

Create new MCAuth Object

```
$MCAuth = new MCAuth\Api();
```

Authentication:

```
try {
    $account = $MCAuth->sendAuth("myemail@example.org", "mypassword");
    var_dump($account);
} catch (Exception $e) {
    echo $e->getMessage();
}
```

Get UUID from username

```
try {
    $uuid = $MCAuth->usernameToUuid("_Cyb3r");
    var_dump($uuid);
} catch (Exception $e) {
    echo $e->getMessage();
}
```

Get username from UUID

```
try {
    $username = $MCAuth->uuidToUsername("be1cac3b60f04e0dba12c77cc8e0ec21");
    var_dump($username);
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Warning!

[](#warning)

Mojang authentication system permits only one active session as reported in the wiki: "Only the one with the latest session ID for your account are allowed to join servers.", so you will be disconnected from the server where you are playing if you try to login via MCAuth.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3434d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3951536?v=4)[Mattia Basone](/maintainers/mattiabasone)[@mattiabasone](https://github.com/mattiabasone)

---

Top Contributors

[![mattiabasone](https://avatars.githubusercontent.com/u/3951536?v=4)](https://github.com/mattiabasone "mattiabasone (18 commits)")

---

Tags

minecraftminecraft-php-authenticationmojang-authenticationphpauthminecraft

### Embed Badge

![Health badge](/badges/mattiabasone-mc-auth/health.svg)

```
[![Health](https://phpackages.com/badges/mattiabasone-mc-auth/health.svg)](https://phpackages.com/packages/mattiabasone-mc-auth)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[overtrue/socialite

A collection of OAuth 2 packages.

1.4k5.6M90](/packages/overtrue-socialite)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

121242.9k1](/packages/ellaisys-aws-cognito)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2280.2k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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