PHPackages                             noellabo/oauth2-mastodon - 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. noellabo/oauth2-mastodon

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

noellabo/oauth2-mastodon
========================

Mastodon OAuth 2.0 Client Provider for The PHP League OAuth2-Client

v1.0.1(7y ago)375MITPHP

Since Jun 17Pushed 7y agoCompare

[ Source](https://github.com/noellabo/oauth2-mastodon)[ Packagist](https://packagist.org/packages/noellabo/oauth2-mastodon)[ RSS](/packages/noellabo-oauth2-mastodon/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Mastodon provider for OAuth 2.0 Client
======================================

[](#mastodon-provider-for-oauth-20-client)

This package provides Mastodon OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

To install, use composer:

```
composer require noellabo/oauth2-mastodon

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\Noellabo\OAuth2\Client\Provider\Mastodon` as the provider.

In the case of ｍastodon, distributed instances have their own OAuth servers, so you need to authenticate by specifying the domain name.

oauth2-mastodon can register the application automatically by specifying the domain name. Once you register the information, please cache it and reuse it.

### Authorization Code Flow

[](#authorization-code-flow)

```
