@@ -140,6 +140,8 @@ Almost everything can be swapped out in Bartender.
140
140
If you would like to handle everything yourself for OAuth redirects and callbacks, you may create your own ` ProviderHandler ` :
141
141
142
142
``` php
143
+ // app/Socialite/UserProviderHandler.php
144
+
143
145
namespace App\Socialite;
144
146
145
147
use Illuminate\Http\Request;
@@ -183,6 +185,8 @@ Then, provide it into the second argument in the `Bartender::serve` method:
183
185
``` php
184
186
// app/Providers/AuthServiceProvider.php
185
187
188
+ namespace App\Providers;
189
+
186
190
use App\Socialite\UserProviderHandler;
187
191
use DirectoryTree\Bartender\Facades\Bartender;
188
192
@@ -204,6 +208,8 @@ If you would like to customize the creation of the user in the default
204
208
handler, you may create your own ` ProviderRepository ` implementation:
205
209
206
210
``` php
211
+ // app/Socialite/UserProviderRepository.php
212
+
207
213
namespace App\Socialite;
208
214
209
215
use App\Models\User;
@@ -238,6 +244,8 @@ class UserProviderRepository implements ProviderRepository
238
244
Then, bind your implementation in the service container in your ` AppServiceProvider ` :
239
245
240
246
``` php
247
+ // app/Providers/AppServiceProvider.php
248
+
241
249
namespace App\Providers;
242
250
243
251
use App\Socialite\UserProviderRepository;
@@ -261,6 +269,8 @@ redirector and flash messages depending on the outcome of a OAuth callback,
261
269
you can create your own ` ProviderRedirector ` implementation:
262
270
263
271
``` php
272
+ // app/Socialite/UserProviderRedirector.php
273
+
264
274
namespace App\Socialite;
265
275
266
276
class UserProviderRedirector implements ProviderRedirector
@@ -304,6 +314,8 @@ class UserProviderRedirector implements ProviderRedirector
304
314
Then, bind your implementation in the service container in your ` AppServiceProvider ` :
305
315
306
316
``` php
317
+ // app/Providers/AppServiceProvider.php
318
+
307
319
namespace App\Providers;
308
320
309
321
use App\Socialite\UserProviderRedirector;
0 commit comments