PHPackages                             arffornia/minecraft-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. arffornia/minecraft-oauth

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

arffornia/minecraft-oauth
=========================

Fork from aberdeener, updated to php8 for laravel11 compatibility, provides easy layer to get a Minecraft profile from a Microsoft Live OAuth session

083[1 PRs](https://github.com/Arffornia/minecraft-oauth/pulls)PHPCI passing

Since Jun 5Pushed 5mo agoCompare

[ Source](https://github.com/Arffornia/minecraft-oauth)[ Packagist](https://packagist.org/packages/arffornia/minecraft-oauth)[ RSS](/packages/arffornia-minecraft-oauth/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Minecraft OAuth
===============

[](#minecraft-oauth)

`Forked from tadhgboyle.``Updated by TheGostsniperfr for PHP 8 and Laravel 11 support.`

Provides easy layer to get a Minecraft profile (UUID, username, skins, capes) from a Microsoft Live OAuth session.

Usage
-----

[](#usage)

You have different solutions for creating the request, here's one that works.

In addition, you'll need to register your Azure app with Mojang for your app to be authorized to use the Mojang api, otherwise you'll get a **403** error code by Mojang API.

To do this, you need to fill in this form (response within a few weeks)

### Create MS request

[](#create-ms-request)

```
$clientId = 'AZURE_OAUTH_CLIENT_ID';
$redirectUri = urlencode('REDIRECT_URI');

$authUrl = "https://login.live.com/oauth20_authorize.srf?client_id=$clientId&response_type=code&redirect_uri=$redirectUri&scope=XboxLive.signin%20offline_access&state=NOT_NEEDED";
```

Nb: Apparently, it's possible to use `service::user.auth.xboxlive.com::MBI_SSL` as a scope to avoid confirming microsoft permissions.

Unfortunately, I haven't had any conclusive results on this, so if you have any information on this subject, I'd be delighted to have it.

### Receive MS responce

[](#receive-ms-responce)

```
require 'vendor/autoload.php';

$client_id = '';
$client_secret = '';
$redirect_uri = '';

try {
    $profile = (new \Arffornia\MinecraftOauth\MinecraftOauth)->fetchProfile(
        $client_id,
        $client_secret,
        $_GET['code'],
        $redirect_uri,
    );
} catch (\Arffornia\MinecraftOauth\Exceptions\MinecraftOauthException $e) {
    echo $e->getMessage();
}

echo 'Minecraft UUID: ' . $profile->uuid();
echo 'Minecraft Username: ' . $profile->username();
echo 'Minecraft Skin URL: ' . $profile->skins()[0]->url();
echo 'Minecraft Cape URL: ' . $profile->capes()[0]->url();
```

Info
----

[](#info)

If you want to check all the MS Auth Scheme.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 54.5% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54660359?v=4)[Brian Perret](/maintainers/TheGostsniperfr)[@TheGostsniperfr](https://github.com/TheGostsniperfr)

---

Top Contributors

[![TheGostsniperfr](https://avatars.githubusercontent.com/u/54660359?v=4)](https://github.com/TheGostsniperfr "TheGostsniperfr (6 commits)")[![tadhgboyle](https://avatars.githubusercontent.com/u/26070412?v=4)](https://github.com/tadhgboyle "tadhgboyle (5 commits)")

### Embed Badge

![Health badge](/badges/arffornia-minecraft-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/arffornia-minecraft-oauth/health.svg)](https://phpackages.com/packages/arffornia-minecraft-oauth)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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