socialiteproviders/appnet
App.net OAuth provider for Laravel Socialite. Adds App.net login to your Laravel app via the SocialiteProviders manager, letting you authenticate users with their App.net accounts through a simple, consistent driver alongside your other providers.
Before you install anything, understand what you're getting: App.net (ADN) shut down in January 2017. This package is a Laravel Socialite OAuth 2.0 provider for a service that no longer has a running API. There is no account.app.net to authenticate against, so a "first use case" in the normal sense does not exist. Treat this package as a reference implementation of a Socialite provider rather than something you wire into a live app.
Minimal install (for study or fork):
composer require socialiteproviders/appnet
Where to look first:
SocialiteProviders/Providers. The README there documents the shared SocialiteProviders\Manager\ServiceProvider registration and the event listener pattern that this split relies on. The split itself has no separate docs.src/Provider.php. It's a small OAuth2 provider; read it to see how getAuthUrl, getTokenUrl, and getUserByToken are wired.composer.json to confirm which Socialite and PHP versions it targets. The 4.1.0 release bumps the package to declare PHP 8 support, so it now installs cleanly on a modern Laravel 9/10-era stack — but a PHP constraint bump is metadata, not a functional revival. The OAuth flow itself is unchanged since the original bulk tag.If you actually need App.net-like federated identity today, stop here and pick a live provider (Mastodon, Bluesky via AT Protocol, GitHub, etc.). The value of this repo is pedagogical.
The package follows the standard SocialiteProviders split pattern, and the only realistic workflow is copying that pattern to a live provider.
Registration (as it would look if the API existed):
// config/app.php — providers array
SocialiteProviders\Manager\ServiceProvider::class,
// app/Providers/EventServiceProvider.php
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
\SocialiteProviders\AppNet\AppNetExtendSocialite::class,
],
],
// config/services.php
'appnet' => [
'client_id' => env('APPNET_CLIENT_ID'),
'client_secret' => env('APPNET_CLIENT_SECRET'),
'redirect' => env('APPNET_REDIRECT_URI'),
],
// routes/web.php
Route::get('/auth/appnet/redirect', fn () => Socialite::driver('appnet')->redirect());
Route::get('/auth/appnet/callback', function () {
$user = Socialite::driver('appnet')->user();
// $user->getId(), ->getNickname(), ->getEmail(), ->getAvatar()
});
Reference patterns worth extracting:
getUserByToken uses the bearer token returned by the token endpoint. Copy that shape when writing providers for APIs that expose /me-style endpoints.stream, write_post, follow, messages). The provider's getScopes() default is a good template for mapping app permissions to Socialite scopes.SocialiteProviders/Providers; the split is generated automatically. If you fork to adapt for a live API, fork the parent repo.If you're using this as a scaffolding template for a new provider (say, a niche Mastodon instance or a self-hosted OAuth2 server), the workflow is:
src/Provider.php and src/AppNetExtendSocialite.php, rename namespaces.getAuthUrl / getTokenUrl to real endpoints.mapUserToObject to match your API's user payload.Socialite::driver('appnet')->redirect() will send users to a dead domain (account.app.net). Do not ship this in production; a redirect there is a broken UX at best, a phishing-looking dead-end at worst.getEmail() still holds verbatim. Treat the version number as "someone ran the monorepo's bulk release tooling again," not "this provider is alive."composer install, but it tells you nothing about laravel/socialite API compatibility. This provider still descends from the ~4.x/early-5.x era. Verify getUserByToken return shapes and AbstractProvider signatures against whatever Socialite is actually installed, and be prepared for the 6.x-era SocialiteWasCalled / extend pattern to differ subtly.getEmail() returns null by design. App.net never guaranteed an email scope; guard against null if you're copying the pattern for a provider that does the same.php artisan config:clear after adding services.appnet is the #1 "driver not supported" red herring.SocialiteWasCalled listener pattern is the one durable lesson here. It's how every socialiteproviders/* package plugs in without touching Socialite core — worth mastering even though this particular instance is inert.composer why socialiteproviders/appnet and be ready to drop it the moment the next PHP or Socialite major lands.How can I help you explore Laravel packages today?