PHPackages                             brianrlewis/magic-admin - 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. brianrlewis/magic-admin

Abandoned → [magiclabs/magic-admin-php](/?search=magiclabs%2Fmagic-admin-php)Library[Authentication &amp; Authorization](/categories/authentication)

brianrlewis/magic-admin
=======================

Unofficial implementation of Magic Admin SDK specification

v1.1.0(5y ago)3371MITPHPPHP &gt;=7.1.0

Since Aug 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/brianrlewis/php-magic-admin)[ Packagist](https://packagist.org/packages/brianrlewis/magic-admin)[ Docs](https://github.com/brianrlewis/php-magic-admin)[ RSS](/packages/brianrlewis-magic-admin/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (1)

DEPRECATED
==========

[](#deprecated)

This package has been deprecated in favor of the [official version](https://github.com/magiclabs/magic-admin-php).

Magic Admin SDK
===============

[](#magic-admin-sdk)

This package is an unofficial implementation of the Magic Admin SDK specification.

As of August 2020 there is no official server side Admin SDK for PHP, only for Node and Python. Magic is intending to release a PHP implementation in the near future ().

The API of this package matches (as closely as possible) the official Node version ().

This package has not undergone rigorous testing so use with caution.

Prerequisites
-------------

[](#prerequisites)

This is a server side package that is intended for use in conjunction with one of the official client SDKs () provided by Magic.

Laravel
-------

[](#laravel)

If your application uses Laravel then you should use [laravel-magic-admin](https://github.com/brianrlewis/laravel-magic-admin) instead of this package.

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

[](#installation)

Run this command to install via composer.

```
composer require brianrlewis/magic-admin

```

Obtain your secret api key by creating an account at

Usage
-----

[](#usage)

Create instance.

```
use BrianRLewis\MagicAdmin\Magic;

$secretApiKey = 'sk_XXXX_XXXXXXXXXXXXXXXX';
$options = ['endpoint' => 'https://api.magic.link'] // Optional
$magic = new Magic($secretApiKey, $options);

```

Token Module ()

```
$magic->token->validate('');

$magic->token->getIssuer('');

$magic->token->decode('');

$magic->token->getPublicAddress('');

```

Users Module ()

```
$magic->users->logoutByIssuer('');

$magic->users->logoutByPublicAddress('');

$magic->users->logoutByToken('');

$metadata = $magic->users->getMetadataByIssuer('');

$metadata = $magic->users->getMetadataByPublicAddress('');

$metadata = $magic->users->getMetadataByToken('');

echo $metadata->email;
echo $metadata->publicAddress;
echo $metadata->issuer;

```

Utils Module ()

```
$header = 'bearer ';
$DIDToken = $magic->utils->parseAuthorizationHeader($header);

```

For further details look at the official documentation ()

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

Every ~7 days

Total

2

Last Release

2121d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31142584?v=4)[Brian Lewis](/maintainers/brianrlewis)[@brianrlewis](https://github.com/brianrlewis)

---

Top Contributors

[![brianrlewis](https://avatars.githubusercontent.com/u/31142584?v=4)](https://github.com/brianrlewis "brianrlewis (24 commits)")

---

Tags

apisdklinkAuthenticationadminPasswordlessmagicfortmatic

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/brianrlewis-magic-admin/health.svg)

```
[![Health](https://phpackages.com/badges/brianrlewis-magic-admin/health.svg)](https://phpackages.com/packages/brianrlewis-magic-admin)
```

###  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)[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)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

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

passwordless authentication and detailed sessioning for laravel

15138.3k](/packages/acidjazz-humble)[virgil/sdk

Virgil is a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and all the necessary infrastructure to enable seamless, end-to-end encryption for any application, platform or device. See below for currently available languages and platforms. Get in touch with us to get preview access to our key infrastructure.

1017.2k](/packages/virgil-sdk)

PHPackages © 2026

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