PHPackages                             chrisnharvey/oauth1 - 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. chrisnharvey/oauth1

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

chrisnharvey/oauth1
===================

Authorize users in your application with multiple OAuth 1.0 providers

18.5k4[1 issues](https://github.com/chrisnharvey/oauth1/issues)PHP

Since May 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/chrisnharvey/oauth1)[ Packagist](https://packagist.org/packages/chrisnharvey/oauth1)[ RSS](/packages/chrisnharvey-oauth1/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth 1.0 Composer Package
==========================

[](#oauth-10-composer-package)

*Deprecated: Use [league/oauth1-client](https://github.com/thephpleague/oauth1-client).*

Authorize users with your application using multiple OAuth 1 providers.

Supported Providers
-------------------

[](#supported-providers)

- Dropbox
- Flickr
- LinkedIn
- Tumblr
- Twitter
- UbuntuOne
- Vimeo

Usage Example
-------------

[](#usage-example)

In this example we will authenticate the user using Twitter.

```
session_start();

$oauth = new \OAuth1\Provider\Twitter(array(
	'id' => 'CLIENT_ID',
	'secret' => 'CLIENT_SECRET',
	'redirect_url' => 'URL_TO_THIS_PAGE'
));

if ($oauth->isCallback()) {
	$oauth->validateCallback(unserialize($_SESSION['token']))
} else {
	$token = $oauth->requestToken();

	$_SESSION['token'] = serialize($token);

	$url = $oauth->authorize($token);

	header("Location: {$url}");
	exit;
}

// Tokens
print_r($oauth->getUserTokens());

// User data
print_r($oauth->getUserInfo());
```

If all goes well you should see a dump of the users tokens and data.

### Calling OAuth 1 APIs using Guzzle

[](#calling-oauth-1-apis-using-guzzle)

You can also use this package to make calls to your respective APIs using Guzzle.

```
$client = new \OAuth1\Client('http://api.twitter.com/1.1');
$client->setProvider($oauth)
    ->setUserTokens($oauth->getUserTokens());

echo $client->get('statuses/mentions_timeline.json')->send();
```

This example should show your Twitter mentions from the API along with the headers

Contribute
----------

[](#contribute)

1. Check for open issues or open a new issue for a feature request or a bug
2. Fork [the repository](https://github.com/chrisnharvey/oauth1) on Github to start making your changes to the `develop` branch (or branch off of it)
3. Write a test which shows that the bug was fixed or that the feature works as expected
4. Send a pull request and bug me until I merge it

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.7% 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://www.gravatar.com/avatar/424e68b8215f79181064984c07fbc268b9b9a5f0ea503a298e76e05a9c70d4d4?d=identicon)[chrisnharvey](/maintainers/chrisnharvey)

---

Top Contributors

[![chrisnharvey](https://avatars.githubusercontent.com/u/619298?v=4)](https://github.com/chrisnharvey "chrisnharvey (29 commits)")[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (1 commits)")

### Embed Badge

![Health badge](/badges/chrisnharvey-oauth1/health.svg)

```
[![Health](https://phpackages.com/badges/chrisnharvey-oauth1/health.svg)](https://phpackages.com/packages/chrisnharvey-oauth1)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

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

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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