File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ php artisan migrate
52
52
53
53
## Setup
54
54
55
- Register the authentication routes:
55
+ Register the authentication routes using ` Bartender::routes() ` .
56
56
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.
58
58
59
59
``` php
60
60
// routes/web.php
@@ -64,6 +64,10 @@ use DirectoryTree\Bartender\Facades\Bartender;
64
64
Bartender::routes();
65
65
```
66
66
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
+
67
71
Set up your [ Socialite Providers] ( https://socialiteproviders.com/ ) in your ` services.php ` configuration file:
68
72
69
73
``` php
Original file line number Diff line number Diff line change 10
10
* @method static array handlers()
11
11
* @method static string getUserModel()
12
12
* @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 )
14
14
* @method static \Illuminate\Http\RedirectResponse redirect(string $driver)
15
15
* @method static \Illuminate\Http\RedirectResponse callback(string $driver)
16
16
*/
Original file line number Diff line number Diff line change 51
51
52
52
$ user = (new UserProviderRepository )->updateOrCreate ('foo ' , $ socialite );
53
53
54
+ expect ($ user ->wasRecentlyCreated )->toBeTrue ();
54
55
expect ($ user ->name )->toBe ('foo ' );
55
56
expect (
$ user->
email )->
toBe (
'[email protected] ' );
56
57
expect ($ user ->provider_id )->toBe ('1 ' );
You can’t perform that action at this time.
0 commit comments