Download the PHP package dutchcodingcompany/filament-socialite without Composer

On this page you can find all versions of the php package dutchcodingcompany/filament-socialite. 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-socialite

Social login for Filament through Laravel Socialite

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Add OAuth2 login through Laravel Socialite to Filament. OAuth1 (eg. Twitter) is not supported at this time.

Installation

Filament version Package version Readme
^3.2.44 (if using SPA mode) 2.x.x Link
^3.2.44 (if using SPA mode) ^1.3.1
3.x 1.x.x Link
2.x 0.x.x

Install the package via composer:

Publish and migrate the migration file:

Other configuration files include:

You need to register the plugin in the Filament panel provider (the default filename is app/Providers/Filament/AdminPanelProvider.php). The following options are available:

This package automatically adds 2 routes per panel to make the OAuth flow possible: a redirector and a callback. When setting up your external OAuth app configuration, enter the following callback URL (in this case for the Filament panel with ID admin and the github provider):

A multi-panel callback route is available as well that does not contain the panel ID in the url. Instead, it determines the panel ID from an encrypted state input (...?state=abcd1234). This allows you to create a single OAuth application for multiple Filament panels that use the same callback URL. Note that this only works for stateful OAuth apps:

If in doubt, run php artisan route:list to see which routes are available to you.

CSRF protection

(Laravel 11.x users can ignore this section)

If your third-party provider calls the OAuth callback using a POST request, you need to add the callback route to the exception list in your VerifyCsrfToken middleware. This can be done by adding the url to the $except array:

`

For Laravel 11.x users, this exception is automatically added by our service provider.

See Socialite Providers for additional Socialite providers.

Icons

You can specify a custom icon for each of your login providers. You can add Font Awesome brand icons made available through Blade Font Awesome by running:

Registration flow

This package supports account creation for users. However, to support this flow it is important that the password attribute on your User model is nullable. For example, by adding the following to your users table migration. Or you could opt for customizing the user creation, see below.

Domain Allow list

This package supports the option to limit the users that can login with the OAuth login to users of a certain domain. This can be used to setup SSO for internal use.

Changing how an Authenticatable user is created or retrieved

You can use the createUserUsing and resolveUserUsing methods to change how a user is created or retrieved.

Change how a Socialite user is created or retrieved

In your plugin options in your Filament panel, add the following method:

This class should at the minimum implement the FilamentSocialiteUser interface, like so:

Check if the user is authorized to use the application

You can use the authorizeUserUsing method to check if the user is authorized to use the application. Note: by default this method check if the user's email domain is in the domain allow list.

Change login redirect

When your panel has multi-tenancy enabled, after logging in, the user will be redirected to their default tenant. If you want to change this behavior, you can call the 'redirectAfterLoginUsing' method on the FilamentSocialitePlugin.

Filament Fortify

This component can also be added while using the Fortify plugin plugin.

Filament Breezy

This component can also be added while using the Breezy plugin plugin.

You can publish the login page for Filament Breezy by running:

Which produces a login page at resources/views/vendor/filament-breezy/login.blade.php.

You can then add the following snippet in your form:

Events

There are a few events dispatched during the authentication process:

Scopes

Scopes can be added to the provider on the panel, for example:

Optional parameters

You can add optional parameters to the request by adding a with key to the provider on the panel, for example:

Stateless Authentication

You can add stateless parameters to the provider configuration in the config/services.php config file, for example:

Note: you cannot use the state parameter, as it is used to determine from which Filament panel the user came from.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-socialite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.2.72
illuminate/contracts Version ^10.0|^11.0
laravel/socialite Version ^5.5
spatie/laravel-package-tools Version ^1.9.2
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 dutchcodingcompany/filament-socialite contains the following files

Loading the files please wait ....