Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Apr 3, 2024
1 parent 27c643c commit 0a5e9f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ Almost everything can be swapped out in Bartender.
If you would like to handle everything yourself for OAuth redirects and callbacks, you may create your own `ProviderHandler`:

```php
// app/Socialite/UserProviderHandler.php

namespace App\Socialite;

use Illuminate\Http\Request;
Expand Down Expand Up @@ -183,6 +185,8 @@ Then, provide it into the second argument in the `Bartender::serve` method:
```php
// app/Providers/AuthServiceProvider.php

namespace App\Providers;

use App\Socialite\UserProviderHandler;
use DirectoryTree\Bartender\Facades\Bartender;

Expand All @@ -204,6 +208,8 @@ If you would like to customize the creation of the user in the default
handler, you may create your own `ProviderRepository` implementation:

```php
// app/Socialite/UserProviderRepository.php

namespace App\Socialite;

use App\Models\User;
Expand Down Expand Up @@ -238,6 +244,8 @@ class UserProviderRepository implements ProviderRepository
Then, bind your implementation in the service container in your `AppServiceProvider`:

```php
// app/Providers/AppServiceProvider.php

namespace App\Providers;

use App\Socialite\UserProviderRepository;
Expand All @@ -261,6 +269,8 @@ redirector and flash messages depending on the outcome of a OAuth callback,
you can create your own `ProviderRedirector` implementation:

```php
// app/Socialite/UserProviderRedirector.php

namespace App\Socialite;

class UserProviderRedirector implements ProviderRedirector
Expand Down Expand Up @@ -304,6 +314,8 @@ class UserProviderRedirector implements ProviderRedirector
Then, bind your implementation in the service container in your `AppServiceProvider`:

```php
// app/Providers/AppServiceProvider.php

namespace App\Providers;

use App\Socialite\UserProviderRedirector;
Expand Down

0 comments on commit 0a5e9f8

Please sign in to comment.