Download the PHP package bbs-lab/filament-okta without Composer

On this page you can find all versions of the php package bbs-lab/filament-okta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-okta

Filament Okta

Latest Version on Packagist Tests Total Downloads

Okta SSO for Filament. An activatable-per-panel plugin that adds a Log In with Okta button to a panel's login screen and wires its login / callback / logout flow — so each panel can run its own Okta configuration. The button is rendered with Filament's own button component, so it inherits each panel's branding (primary colour, radius, dark mode).

It is the Filament adapter for bbs-lab/laravel-okta, which is installed automatically and owns the framework-agnostic Okta flow: the Socialite driver, the login / callback / logout controller, the user resolver, and the lifecycle hooks.

Requirements

Installation

Both service providers are auto-discovered.

Activate the plugin on a panel

Okta application

In your Okta admin, create an OIDC / Web application and set:

where {panel-path} is the panel's path (e.g. admin). These paths are configurable per panel — see Per-panel configuration.

Credentials

Add the okta block to config/services.php (the package intentionally does not own your credentials):

OKTA_REDIRECT_URI is optional. The redirect URI is a route this package generates, so it is derived automatically — and because the plugin is per panel, each panel derives its own callback (/{panel-path}/authorization-code/callback). You only declare each panel's matching Sign-in redirect URI in Okta. A panel with its own Okta application registers its own Socialite driver and services.* block; set a redirect there only to override the derived URL (e.g. behind a reverse proxy).

Per-panel configuration

Because the plugin is activated per panel, each panel can carry its own Okta configuration. Any option left unset falls back to the shared config('okta.*') of the base package.

paths() sets only the arguments you pass; the rest fall back to the shared config('okta.paths.*') then the built-in defaults above. The route names never change, so the login button and the derived redirect URI follow automatically — but a changed callback path must be re-whitelisted in Okta.

A second panel can activate the plugin with entirely different values — each panel mounts its own filament-okta.{panelId}.* routes and resolves its own configuration per request.

Using a distinct Okta application per panel

socialiteDriver('okta-admin') points a panel at a separate Socialite driver, which you must register yourself (the package only registers the default okta driver). In a service provider:

and add the matching credentials block in config/services.php:

If you name a driver that isn't registered, the login button redirect fails gracefully back to the login screen with an error notification (rather than a 500).

Routes

For each panel that activates the plugin, these routes are mounted. Every URI is prefixed by that panel's path ($panel->getPath(), read at boot) — so a panel at /backend-panel gets /backend-panel/authorization-code/callback. Below, {panel-path} is that prefix and {panel} is the panel id:

Route (default URI) Name Purpose
GET {panel-path}/authorization-code/redirect filament-okta.{panel}.login Redirects to Okta (start login).
GET {panel-path}/authorization-code/callback filament-okta.{panel}.callback Login callback — resolves the user and logs them in (the Sign-in redirect URI target).
GET {panel-path}/authorization-code/logout filament-okta.{panel}.logout Logs out locally, and — when SSO logout is on — via Okta's OIDC end-session.
GET {panel-path}/authorization-code/callback/logout filament-okta.{panel}.callback.logout Okta's post-logout landing.

The authorization-code/* paths are configurable per panel via OktaPlugin::make()->paths(...) (see above). The route names use the panel id (stable whatever the path), so reference them with route('filament-okta.'.$panel->getId().'.login') rather than hard-coding a URI.

User resolution, gating & lifecycle hooks

There is deliberately no user-mapping config — the base resolves an Okta account through the panel's guard's own user provider (by a stable id column then a verified email, never creating a user), and everything else is a hook on the BBSLab\LaravelOkta\Facades\Okta facade (resolveUserUsing, authorizeUserToLogin, beforeLogin, afterLogin, onLoginDenied) or a custom BBSLab\LaravelOkta\Contracts\OktaUserResolver.

The default resolver does not gate — it signs in any user it finds by email. Deciding who may sign in is your job — and Filament's own canAccessPanel() is a separate layer (also permissive by default). Set both: gate the SSO login (Okta::authorizeUserToLogin(...)) and implement a real canAccessPanel().

A denied or failed login is surfaced on the panel login screen as a Filament danger notification (via FilamentOktaPanel::flashError()), so it looks native.

See the bbs-lab/laravel-okta README for the hooks, the stable-identifier config, and how to extend DefaultOktaUserResolver for a reusable gate.

Testing

Browser & live e2e

The browser (Pest v4) and live Playwright suites cover the pre-redirect login UX (the Okta button and the start of the OIDC redirect); the full SSO round-trip needs a real Okta org.

Security

Please email [email protected] for security issues instead of the issue tracker.

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

Credits

License

The MIT License (MIT). See LICENSE.md.


All versions of filament-okta with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
bbs-lab/laravel-okta Version ^3.0
filament/filament Version ^5.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bbs-lab/filament-okta contains the following files

Loading the files please wait ...