PHPackages                             alofoxx/oauth2-gumroad - 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. alofoxx/oauth2-gumroad

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

alofoxx/oauth2-gumroad
======================

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

v1.0.1(5y ago)4323[3 issues](https://github.com/Alofoxx/oauth2-gumroad/issues)[1 PRs](https://github.com/Alofoxx/oauth2-gumroad/pulls)MITPHPPHP &gt;=7.2CI failing

Since Jun 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Alofoxx/oauth2-gumroad)[ Packagist](https://packagist.org/packages/alofoxx/oauth2-gumroad)[ RSS](/packages/alofoxx-oauth2-gumroad/feed)WikiDiscussions master Synced yesterday

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

Gumroad Provider for OAuth 2.0 Client
=====================================

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

[![Source Code](https://camo.githubusercontent.com/b655a217054fc336ac5873dfa58013a1e7fb4aa853fcb341bce8b77e989681e9/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d616c6f666f78782f6f61757468322d2d67756d726f61642d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/alofoxx/oauth2-gumroad)[![Latest Version](https://camo.githubusercontent.com/66fd9585e7c8911053d5f03f09c537bf7a1139caa90b5a521a1ad2633c5dab43/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616c6f666f78782f6f61757468322d67756d726f61642e7376673f7374796c653d666c61742d737175617265)](https://github.com/alofoxx/oauth2-gumroad/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2419c5b346cd72f037a797c06124f27e551f5547677b0a9ef9c430d0d25afa08/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616c6f666f78782f6f61757468322d67756d726f61642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/alofoxx/oauth2-gumroad)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7764e6115b3c4ce31ffa8b4bfe5fdf31a116a260f433d8ad0da044f3e0bd5624/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f416c6f666f78782f6f61757468322d67756d726f61642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Alofoxx/oauth2-gumroad/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/af60dff2069a8cd71d5fa6bca6f1abc6c1b421250a341f2012be1fd493d58adf/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f416c6f666f78782f6f61757468322d67756d726f61642f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Alofoxx/oauth2-gumroad?branch=master)[![Total Downloads](https://camo.githubusercontent.com/bbe80ee9c73c476c6317520ade25706277c9515d9c6c8e502b6f19bf9ce0afc7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6f666f78782f6f61757468322d67756d726f61642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alofoxx/oauth2-gumroad)

This package provides Gumroad OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client), v2.0 and up.

Requirements
------------

[](#requirements)

The following versions of PHP are supported.

- PHP 7.1
- PHP 7.2
- PHP 7.3
- PHP 7.4

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

[](#installation)

To install, use composer:

```
$ composer require alofoxx/oauth2-gumroad
```

Usage
-----

[](#usage)

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

### Sample Authorization Code Flow

[](#sample-authorization-code-flow)

This self-contained example:

1. Gets an authorization code
2. Gets an access token using the provided authorization code
3. Looks up the user's profile with the provided access token

You can try this script by [registering a Gumroad Application](https://gumroad.com/settings/advanced#application-form) with a redirect URI to your server's copy of this sample script. Then, place the Gumroad app's application id and secret, along with that same URI, into the settings at the top of the script.

```
