Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreitier/streamline-authentication
Common authentication methods for multi-tenant Laravel apps
https://github.com/dreitier/streamline-authentication
authentication laravel multitenancy multitenant oauth socialite sso
Last synced: about 11 hours ago
JSON representation
Common authentication methods for multi-tenant Laravel apps
- Host: GitHub
- URL: https://github.com/dreitier/streamline-authentication
- Owner: dreitier
- License: mit
- Created: 2022-11-03T14:40:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T09:09:51.000Z (over 1 year ago)
- Last Synced: 2024-04-09T13:36:08.803Z (10 months ago)
- Topics: authentication, laravel, multitenancy, multitenant, oauth, socialite, sso
- Language: PHP
- Homepage:
- Size: 126 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Streamline Authentication for Laravel - dreitier/streamline-authentication
### *Common authentication methods for multi-tenant Laravel apps.*## Features
- Provide common authentication methods
- Form-based logins with principal (e.g. username, email) and password
- Password-less logins by sending emails with a magic login link
- Logins by selecting pre-defined users for demo/e2e environments
- Socialite integration for OAuth
- Targeted for developers of multi-tenant Laravel SaaS/on-premises applications
- Activation of different authentication methods for only specific groups of customers
- Configurable authentication methods per tenant
- Users can log in through different Socialite drivers in the same tenant## When to go with Streamline Authentication instead of Laravel Fortify?
For the most Laravel applications, [Fortify](https://laravel.com/docs/9.x/fortify) implements all required authentication workflows in a much easier and Laravel-esk way. If you need password-based authentication with optional 2FA enabled, and a registration and password recovery workflow you should go probably go with Fortify.
If you need a more configurable and dynamic way of enabling and configuring different authentication methods throughout different tenants, *Streamline Authentication* might be an option for you.## Installation
Install the composer package and publish the required configuration:
```bash
composer require dreitier/streamline-authenticationphp artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=config
```### Custom views
If you want to customize the views and mails, publish the assets with
```bash
php artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=assets
```You find the customized assets below `resources/views/vendor/streamline-authentication`.
### Custom routes
By default, *Streamline Authentication* registers the authentication method flows at the `/sign-in` endpoint. Only enabled authentication methods are registered.If you want to publish the routes by yourself, use
```bash
php artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=routes
```and set in `config/streamline-authentication.php`:
```php
return [
// ...
'routes' => false
// ...
];
```## Configuration
`config/streamline-authentication.php` contains annotated configuration options.## Terminology
| Term | Description |
| --- |----------------------------------------------------------------------------|
| Authentication method | Like form-based authentication, Socialite etc. |
| Authentication provider | Provides the configuration for an authentication method of a given backend |## FAQ