Skip to content
DirectoryTreePublic

About

An opinionated way to authenticate users using Laravel Socialite.

Topics

Resources

Stars

285 stars

Watchers

1 watching

Forks

Repository files navigation

Bartender

An opinionated way to authenticate users using Laravel Socialite.

Tests Total Downloads Latest Version License

Contents · Installation · Usage


Bartender serves you a controller, routes, and a default implementation for easily handling authentication with Laravel Socialite providers. Almost everything in Bartender can be customized.

Contents

Requirements

  • PHP >= 8.0
  • Laravel >= 9.0
  • Laravel Socialite >= 5.0

Installation

You can install the package via composer:

composer require directorytree/bartender

Then, publish the migrations. They will create the required columns on the users table:

  • provider_id
  • provider_name
  • provider_access_token
  • provider_refresh_token

If your application does not need to store/access provider tokens, you may delete the 2024_10_27_131354_add_provider_token_columns_to_users_table.php migration.

php artisan vendor:publish --provider="DirectoryTree\Bartender\BartenderServiceProvider"

Finally, run the migrations:

php artisan migrate

Setup

Register the authentication routes using Bartender::routes().

This will register the