Skip to content

Commit 5280ee4

Browse files
committed
WIP
1 parent de0693a commit 5280ee4

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ php artisan migrate
5252

5353
## Setup
5454

55-
Register the authentication routes:
55+
Register the authentication routes using `Bartender::routes()`.
5656

57-
> This will register the `/auth/{driver}/redirect` and `/auth/{driver}/callback` routes.
57+
This will register the `/auth/{driver}/redirect` and `/auth/{driver}/callback` routes.
5858

5959
```php
6060
// routes/web.php
@@ -64,6 +64,10 @@ use DirectoryTree\Bartender\Facades\Bartender;
6464
Bartender::routes();
6565
```
6666

67+
> [!important]
68+
> Remember to register this callback URL in your OAuth provider's settings.
69+
> For example, a Google OAuth callback would be `/auth/google/callback`.
70+
6771
Set up your [Socialite Providers](https://socialiteproviders.com/) in your `services.php` configuration file:
6872

6973
```php

src/Facades/Bartender.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @method static array handlers()
1111
* @method static string getUserModel()
1212
* @method static void setUserModel(string $userModel)
13-
* @method static void serve(string $driver, string $handler)
13+
* @method static void serve(string $driver, string $handler = null)
1414
* @method static \Illuminate\Http\RedirectResponse redirect(string $driver)
1515
* @method static \Illuminate\Http\RedirectResponse callback(string $driver)
1616
*/

tests/UserProviderRepositoryTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
$user = (new UserProviderRepository)->updateOrCreate('foo', $socialite);
5353

54+
expect($user->wasRecentlyCreated)->toBeTrue();
5455
expect($user->name)->toBe('foo');
5556
expect($user->email)->toBe('[email protected]');
5657
expect($user->provider_id)->toBe('1');

0 commit comments

Comments
 (0)