Download the PHP package milon/bohurupee-laravel without Composer
On this page you can find all versions of the php package milon/bohurupee-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download milon/bohurupee-laravel
More information about milon/bohurupee-laravel
Files in milon/bohurupee-laravel
Package bohurupee-laravel
Short Description Optional Laravel Socialite adapter for the Bohurupee local identity provider
License MIT
Homepage https://github.com/milon/bohurupee-laravel
Informations about the package bohurupee-laravel
milon/bohurupee-laravel
Optional Laravel Socialite adapter for
Bohurupee. When enabled, Socialite::driver()
talks to a local Bohurupee process instead of Google, GitHub, or any other
remote IdP.
Packagist · GitHub · Bohurupee
This package is dev-only. It refuses to boot when APP_ENV=production.
The screenshots are the Socialite example in the Bohurupee repo. The buttons never call Google or GitHub. Bohurupee asks which persona to continue as, then Socialite receives that user.
Requirements
- PHP 8.2 or newer
- Laravel 12 or 13 (
illuminate/support^12 or ^13) - Laravel Socialite ^5.16
- A Bohurupee process, usually
http://127.0.0.1:4190
Install
The service provider is auto-discovered. Start Bohurupee, then point the app at it:
Keep the usual config/services.php client IDs and redirect URIs. Bohurupee
accepts any local secret.
Publish the config if you prefer PHP over env:
Configure
| Variable | Default | Meaning |
|---|---|---|
BOHURUPEE_ENABLED |
false |
Wrap Socialite when true |
BOHURUPEE_URL |
http://127.0.0.1:4190 |
Server-side origin (token + userinfo) |
BOHURUPEE_PUBLIC_URL |
same as BOHURUPEE_URL |
Browser authorize redirect (set when the app is in Docker) |
BOHURUPEE_DRIVERS |
empty | Comma-separated names to wrap. Empty wraps every Socialite::driver($name), including custom slugs |
BOHURUPEE_EXCEPT |
empty | Names that stay on the real provider |
BOHURUPEE_ERROR_REDIRECT |
/login (see below) |
HTML redirect after Deny / OAuth error= |
When Laravel runs in Docker Compose and Bohurupee is a sibling service, point
BOHURUPEE_URL at the internal hostname (http://bohurupee:4190) and
BOHURUPEE_PUBLIC_URL at the published host port the browser can open.
Deny / OAuth errors
When the user clicks Deny (or Bohurupee returns another error= on the
callback), Socialite::driver(...)->user() throws
Milon\Bohurupee\OAuthErrorException instead of failing on a missing code.
The exception renders itself:
- JSON (
Accept: application/json/expectsJson):400witherror,error_description,state,provider - HTML: redirect to
BOHURUPEE_ERROR_REDIRECT, orfilament.admin.auth.login/login//login, with flash keysbohurupee_oauth_error,filament-socialite-login-error, anderror
Apps can also catch the exception:
Usage
Existing Socialite routes do not change. The factory returns a local provider for each wrapped name:
Authorize, token, and userinfo are called on Bohurupee:
GET {BOHURUPEE_URL}/{driver}/authorizePOST {BOHURUPEE_URL}/{driver}/tokenGET {BOHURUPEE_URL}/{driver}/userinfo
Mapped fields, first match wins:
| Socialite | userinfo keys |
|---|---|
id |
id, sub |
email |
email |
name |
name, display_name |
nickname |
nickname, login, preferred_username |
avatar |
picture.data.url, picture, avatar, profile_image_url, avatar_url |
$user->getRaw() is the full userinfo JSON. Provider-shaped payloads are
documented in the Bohurupee repo at
docs/socialite.md.
How the adapter wraps Socialite (factory, URLs, mapping) is
How the Laravel adapter works.
Production
If BOHURUPEE_ENABLED=true and APP_ENV=production, boot throws
Milon\Bohurupee\ProductionForbiddenException. Require the package as
--dev and leave the flag off in deployed environments.
Tests
CI runs PHP 8.2–8.5 against Laravel 12 and 13. Tests mock HTTP, so they never call a real provider.